Skip to content

fix: remediate CVE's by upgrading lxml and lxml_html_clean - #17366

Merged
yingfeng merged 1 commit into
infiniflow:mainfrom
Nordix:fix/lxml-6.1.0
Jul 24, 2026
Merged

yingfeng merged 1 commit into
infiniflow:mainfrom
Nordix:fix/lxml-6.1.0

Conversation

@rayhanest

Copy link
Copy Markdown
Contributor

Summary

Remediates four CVEs in lxml and lxml_html_clean by upgrading transitive dependency constraints and bumping crawl4ai to unblock the resolution.

CVE Severity Package Installed Fixed in
CVE-2026-41066 HIGH lxml 5.4.0 6.1.0
CVE-2026-49825 HIGH lxml_html_clean 0.4.3 0.4.5
CVE-2026-28348 MEDIUM lxml_html_clean 0.4.3 0.4.5
CVE-2026-28350 MEDIUM lxml_html_clean 0.4.3 0.4.5
  • Bumped crawl4ai from >=0.9.0,<0.9.1 to >=0.9.2,<0.9.3, version 0.9.2 relaxes lxml constraint to >=5.3,<7. The strict <0.9.3 upper bound on crawl4ai is maintained per project convention
  • Added inscriptis>=2.7.3 to constraint-dependencies, version 2.7.3 relaxes lxml constraint to >=5.4.0,<6.2.0
  • Added lxml>=6.1.0 to constraint-dependencies
  • Added lxml_html_clean>=0.4.5 to constraint-dependencies

exclude-dependencies entry for unclecode-litellm (still declared by crawl4ai 0.9.2) continues to prevent the namespace collision that previously crashed RAGFlow.

Verification

  • lxml is used widely across the codebase for HTML/XML parsing. The 5.x → 6.x upgrade maintains API compatibility for standard usage (lxml.html, lxml.etree).
  • lxml_html_clean API is unchanged between 0.4.3 and 0.4.5.
  • crawl4ai 0.9.2 is a patch bump from 0.9.0 with no API changes affecting RAGFlow's usage.
  • inscriptis 2.7.3 is a patch bump from 2.7.0.

Testing

  • Full unit test suite passes
  • uv sync resolves cleanly
  • Verified crawl4ai imports without litellm namespace collision

@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. 🌈 python Pull requests that update Python code labels Jul 24, 2026
@coderabbitai

coderabbitai Bot commented Jul 24, 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: bc6b2ffa-c55b-4544-ac8b-81811d8d9ae5

📥 Commits

Reviewing files that changed from the base of the PR and between 970e4b9 and bcb5fb9.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • pyproject.toml
🚧 Files skipped from review as they are similar to previous changes (1)
  • pyproject.toml

📝 Walkthrough

Walkthrough

Changes

Dependency Constraint Updates

Layer / File(s) Summary
Dependency and security constraints
pyproject.toml
Updates crawl4ai to the >=0.9.2,<0.9.3 range and adds minimum constraints for lxml, lxml_html_clean, and inscriptis with related CVE notes.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

A rabbit hops through parses so clean,
With newer tools in its little machine.
Crawl4ai bounds rise,
Safer versions surprise,
And carrots compile in a secure routine.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly reflects the main change: remediating CVEs by upgrading lxml-related dependencies.
Description check ✅ Passed The description includes the required Summary section and provides sufficient 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pyproject.toml`:
- Around line 220-228: Raise the lxml dependency floor in the project
dependencies from 6.1.0 to 6.1.1, preserving the existing constraint format and
surrounding dependency declarations.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 50b83276-841c-461e-9622-082ac546d1ea

📥 Commits

Reviewing files that changed from the base of the PR and between 75c9af3 and 970e4b9.

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

Comment thread pyproject.toml Resolved
@JinHai-CN JinHai-CN added the ci Continue Integration label Jul 24, 2026
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #17366   +/-   ##
=======================================
  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.

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:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants