Skip to content

Could you help fix the backdoor vulnerability caused by a risky pre-trained models used in this repo? #1

@Slverhand

Description

@Slverhand

Hi, @jstzwj, I'd like to report that a potentially risky pretrained model is being used in this project, which may pose backdoor threats. Please check the following code example:

pdf2txt_debug.py

from latyas.layout.models.texteller.texteller_layout_model import TexTellerLayoutModel
model = TexTellerLayoutModel.from_pretrained("XiaHan19/texteller_rtdetr_r50vd_6x_coco")

page_layout = model.detect(page_img)

Issue Description

As shown above, in the pdf2txt_debug.py file, the model "XiaHan19/texteller_rtdetr_r50vd_6x_coco" is first downloaded and loaded by the TexTellerLayoutModel.from_pretrained method. Subsequently,the model.detect() method is used to execute the model .

This model File has been flagged as risky on the HuggingFace platform. Specifically, rtdetr_r50vd_6x_coco.onnx file is marked as malicious and may trigger backdoor threats. For certain specific inputs, the backdoor in the models could be activated, effectively altering the model's behavior.

Image

Related Risk Reports:XiaHan19/texteller_rtdetr_r50vd_6x_coco risk report

Suggested Repair Methods

  1. Use the safetensors format of the official model of this model sentence-transformers/all-MiniLM-L6-v2
  2. If replacement is not feasible, please include a warning about potential security risks when instantiating the relevant classes.
  3. Visually inspect the model using OSS tools like Netron. If no issues are found, report the false threat to the scanning platform

As a popular machine learning projects, every potential risk could be propagated and amplified. Could you please address the above issues?

Thanks for your help~

Best regards,
Sliverhand

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions