Skip to content

fix(pii): bump transformers to 5.5.0 for LightGlue RCE advisory#5662

Open
waleedlatif1 wants to merge 3 commits into
stagingfrom
worktree-dependabot-transformers-5.5.0
Open

fix(pii): bump transformers to 5.5.0 for LightGlue RCE advisory#5662
waleedlatif1 wants to merge 3 commits into
stagingfrom
worktree-dependabot-transformers-5.5.0

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Type of Change

  • Bug fix

Testing

  • Verified the full combined pin set (torch 2.11.0, gliner 0.2.27, transformers 5.5.0, huggingface_hub 1.23.0, presidio 2.2.362, spacy 3.8.14) resolves with pip install --dry-run in a clean venv — tokenizers resolves to 0.22.2 within transformers' >=0.22.0,<=0.23.0 range
  • gliner 0.2.27 allows transformers>=4.51.3,<5.7.0 and huggingface_hub>=0.21.4; Dockerfile torch==2.11.0 satisfies transformers' torch>=2.4

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

transformers <5.5.0 is vulnerable to arbitrary code execution during
model initialization in the LightGlue loading path (Dependabot alerts
#174/#175). huggingface_hub moves 1.3.0 -> 1.23.0 because transformers
5.5.0 requires huggingface-hub>=1.5.0.

Verified the full pin set (torch 2.11.0, gliner 0.2.27, presidio
2.2.362, spacy 3.8.14) resolves with pip; gliner 0.2.27 allows
transformers <5.7.0 and any hub >=0.21.4.
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 14, 2026 2:41am

Request Review

@cursor

cursor Bot commented Jul 14, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Scoped to GLiNER image dependency pins and an additive Docker build-time inference assert; no runtime auth or data-path changes.

Overview
Security dependency bumps in requirements-gliner.txt: transformers 5.3.0 → 5.5.0 (addresses the LightGlue arbitrary-code-execution advisory) and huggingface_hub 1.3.0 → 1.23.0 so pip resolution satisfies transformers’ minimum hub version during the gliner image build.

Docker build hardening in pii.Dockerfile: after baking GLiNER weights, the build now runs a predict_entities smoke check (sample text + person/location/date labels aligned with GLINER_ENTITY_MAPPING) and fails the image build if those labels are missing—catching cases where a transformers/gliner bump loads the model but stops returning detections.

Reviewed by Cursor Bugbot for commit 6dd8465. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates the PII GLiNER image dependencies and adds a build-time inference check.

  • Bumps transformers to 5.5.0 for the LightGlue advisory.
  • Bumps huggingface_hub to 1.23.0 for dependency resolution.
  • Runs a GLiNER smoke inference during the Docker build.
  • Requires person, location, and date detections before the image layer succeeds.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
apps/pii/requirements-gliner.txt Updates the GLiNER-related dependency pins used by the PII image.
docker/pii.Dockerfile Adds a build-time GLiNER inference check for person, location, and date labels.

Reviews (3): Last reviewed commit: "improvement(pii): require date detection..." | Re-trigger Greptile

Comment thread apps/pii/requirements-gliner.txt
The bake step previously only proved GLiNER.from_pretrained loads —
a transformers/gliner bump that silently stops returning detections
would still build and pass /health. The bake step now runs
predict_entities on a sample sentence (labels from engines.py's
GLINER_ENTITY_MAPPING) and fails the build unless person + location
are detected.

Verified against the exact bumped pin set (transformers 5.5.0,
huggingface_hub 1.23.0, gliner 0.2.27, torch 2.11.0): person 0.9999,
location 0.9951, date 0.9987.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit e6884fa. Configure here.

Comment thread docker/pii.Dockerfile Outdated
…sert

The smoke input already requests the date label; asserting it closes
the gap where DATE_TIME detection could silently regress while person
and location still pass. Verified locally against the bumped pin set:
all three labels detected.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 6dd8465. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant