Skip to content

XXE in LxmlEventHandler.parse() - #1228

Merged
tefra merged 4 commits into
tefra:mainfrom
skinkie:sec_external_entities
Oct 16, 2026
Merged

tefra merged 4 commits into
tefra:mainfrom
skinkie:sec_external_entities

Conversation

@skinkie

@skinkie skinkie commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

As stated in #1212 there is a XXE possibility for untrusted sources. This pull request makes resolving external entities configurable and disabled by default.

📒 Description

Makes resolve external reference in lxml in optional.

Resolves #1212

🔗 What I've Done

Add a configuration option.

💬 Comments

🛫 Checklist

@codecov

codecov Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.97%. Comparing base (f408ff7) to head (2307e6b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1228   +/-   ##
=======================================
  Coverage   99.97%   99.97%           
=======================================
  Files         117      117           
  Lines        9411     9412    +1     
  Branches     1446     1446           
=======================================
+ Hits         9409     9410    +1     
  Misses          1        1           
  Partials        1        1           

☔ 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.

@sonarqubecloud

sonarqubecloud Bot commented Aug 5, 2026

Copy link
Copy Markdown

@tefra tefra left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Can you update the tests please 🙏

@skinkie

skinkie commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Can you update the tests please 🙏

If you have a suggestion what to update...

skinkie and others added 4 commits October 16, 2026 11:07
As stated in tefra#1212 there is a XXE possibility for untrusted sources. This pull request makes resolving external entities configurable and disabled by default.
@tefra
tefra force-pushed the sec_external_entities branch 2 times, most recently from 2307e6b to defb492 Compare October 16, 2026 08:14
@sonarqubecloud

Copy link
Copy Markdown

@tefra
tefra merged commit cd7a341 into tefra:main Oct 16, 2026
14 checks passed
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.

XXE in LxmlEventHandler.parse() — iterparse() resolves external entities by default

2 participants