Skip to content

fix: remediate nltk CVEs by constraining to >=3.10.0 - #17443

Merged
yingfeng merged 1 commit into
infiniflow:mainfrom
Nordix:fix/nltk-3.10.0
Jul 27, 2026
Merged

yingfeng merged 1 commit into
infiniflow:mainfrom
Nordix:fix/nltk-3.10.0

Conversation

@rayhanest

Copy link
Copy Markdown
Contributor

Summary

Remediates five nltk CVEs by adding nltk>=3.10.0 to constraint-dependencies in pyproject.toml.

CVE Severity Installed Fixed in
CVE-2025-14009 CRITICAL 3.9.2 3.9.3
CVE-2026-0846 HIGH 3.9.2 3.9.3
CVE-2026-0847 HIGH 3.9.2 —
CVE-2026-33231 HIGH 3.9.2 3.9.4
CVE-2026-33236 HIGH 3.9.2 —
CVE-2026-54293 HIGH 3.9.2 3.10.0
CVE-2026-33230 MEDIUM 3.9.2 3.9.4

CVE-2026-0847 and CVE-2026-33236 have no confirmed fixed version.

nltk is a transitive dependency (pulled in by crawl4ai and infinity-sdk). No package in the graph caps it below 3.10.0. It was stuck at 3.9.2 simply because the lockfile had never been re-resolved.

Verification

RAGFlow uses nltk for:

  • from nltk.corpus import wordnet (synonym expansion in rag/nlp/synonym.py)
  • nltk.download("wordnet"/"punkt_tab") (data download at startup in api/validation.py)

The corpus API is unchanged in 3.10.0. The pre-bundled nltk_data (wordnet, punkt, punkt_tab) in the Docker image is compatible with the newer package version.

Testing

  • Full unit test suite passes
  • Verified wordnet.ensure_loaded() succeeds with bundled nltk_data
  • uv sync resolves cleanly

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🌈 python Pull requests that update Python code labels Jul 27, 2026
@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0ee67a1e-c3ad-4dc3-be4b-2fca5648357a

📥 Commits

Reviewing files that changed from the base of the PR and between 5bfd59f and cad5179.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • pyproject.toml

📝 Walkthrough

Walkthrough

The uv dependency constraints in pyproject.toml now require nltk>=3.10.0, with accompanying CVE-related comments.

Changes

NLTK dependency constraint

Layer / File(s) Summary
NLTK version constraint
pyproject.toml
Adds nltk>=3.10.0 under [tool.uv].constraint-dependencies with CVE-related comments.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: buua436

Poem

A bunny checks the versions bright,
NLTK hops to safer height.
Four lines added, clean and neat,
CVE notes beneath its feet.
The dependency burrow’s sweet!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: constraining nltk to a fixed minimum version to address CVEs.
Description check ✅ Passed The description includes the required summary and adds helpful context, verification, and testing details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@yingfeng yingfeng added the ci Continue Integration label Jul 27, 2026
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.65%. Comparing base (cd846cc) to head (cad5179).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #17443   +/-   ##
=======================================
  Coverage   90.65%   90.65%           
=======================================
  Files          10       10           
  Lines         717      717           
  Branches      118      118           
=======================================
  Hits          650      650           
  Misses         39       39           
  Partials       28       28           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yingfeng
yingfeng merged commit 1ae1dd1 into infiniflow:main Jul 27, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration 🌈 python Pull requests that update Python code size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants