Skip to content

fix: raise lxml upper bound to <7.0.0#275

Open
chris-lumi-ai wants to merge 1 commit intoaws:masterfrom
chris-lumi-ai:fix/lxml-version-cap
Open

fix: raise lxml upper bound to <7.0.0#275
chris-lumi-ai wants to merge 1 commit intoaws:masterfrom
chris-lumi-ai:fix/lxml-version-cap

Conversation

@chris-lumi-ai
Copy link
Copy Markdown

@chris-lumi-ai chris-lumi-ai commented May 4, 2026

Description

Raises the lxml upper bound in requirements.txt from <=6.0.2 to <7.0.0.

Motivation and Context

lxml 6.1.0 addresses CVE-2026-41066 (XXE via changed resolve_entities default in iterparse/ETCompatXMLParser). The current <=6.0.2 cap prevents downstream users from taking that security fix.

lxml 6.0 support was already validated in this repo (see TestLxmlCurlyBraceCompatibility in test/unit/plugin/test_adfs_credentials_provider.py). lxml 6.1.0 introduces no breaking changes for this package because all lxml usage flows through BeautifulSoup4, which abstracts the parser API entirely:

  • adfs_credentials_provider.pybs4.BeautifulSoup(response.text, features="lxml")
  • saml_credentials_provider.pybs4.BeautifulSoup(doc, "xml")
  • ping_credentials_provider.pybs4.BeautifulSoup(response.text)

None of the removed or changed lxml 6.x APIs are called directly (setElementClassLookup, apply, evaluate, MemDebug, smart-string text_content, iterparse entity resolution default). BeautifulSoup4 isolates all of that. Raising the cap to <7.0.0 unblocks the upgrade path while matching the approach already taken for lxml 6.0.

Testing

No code paths were changed — only the declared version constraint. The existing TestLxmlCurlyBraceCompatibility test class already covers lxml 6.x + BeautifulSoup4 compatibility for the ADFS provider. All existing unit tests pass unchanged with lxml 6.1.0 installed.

Screenshots

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • Local run of ./build.sh succeeds
  • Code changes have been run against the repository's pre-commit hooks (pre-commit run --files requirements.txt — clean; pre-existing hook failures exist in untouched files)
  • Commit messages follow Conventional Commit Specification
  • I have read the README document
  • I have added tests to cover my changes (no code was changed; existing TestLxmlCurlyBraceCompatibility covers lxml 6.x compatibility)
  • I have run all unit tests using pytest test/unit and they are passing

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

lxml 6.0 support was already validated (see TestLxmlCurlyBraceCompatibility).
lxml 6.1 introduces no breaking changes for this package: all lxml usage
goes through BeautifulSoup4, which abstracts the parser API, and none of
the deprecated/removed lxml 6.x APIs (setElementClassLookup, apply,
evaluate, MemDebug, text_content smart strings) are called directly.

Bumping the cap from <=6.0.2 to <7.0.0 unblocks downstream users who
need lxml 6.1.0+ to address CVE-2026-41066.
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