GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-149018: Use `XML_SetHashSalt16Bytes` in `pyexpat`/`_elementtree` when possible by StanFromIreland · Pull Request #149023 · python/cpython

Conversation

@StanFromIreland

@StanFromIreland StanFromIreland commented Apr 26, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: [CVE-2026-7210] Insufficient entropy in pyexpat with protection against hash flooding #149018

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hartwork reacted with heart emoji
All reactions
  • ❤️ 1 reaction
StanFromIreland added 2 commits April 26, 2026 19:31
@StanFromIreland
Use XML_SetHashSalt16Bytes from libExpat when possible
03794ce
@StanFromIreland
Add _Py_HashSecret_t.expat.hashsalt16 instead
ccb8d2f
@StanFromIreland
StanFromIreland requested review from picnixz and serhiy-storchaka April 26, 2026 18:42
@StanFromIreland
StanFromIreland requested a review from gpshead as a code owner April 26, 2026 18:42
@bedevere-app bedevere-app Bot added the awaiting core review label Apr 26, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Apr 26, 2026
[CVE-2026-7210] Insufficient entropy in pyexpat with protection against hash flooding #149018
Closed
@StanFromIreland StanFromIreland added needs backport to 3.10 needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels Apr 27, 2026
gpshead
gpshead approved these changes May 7, 2026
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels May 7, 2026
@picnixz picnixz added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 7, 2026
@bedevere-bot

bedevere-bot commented May 7, 2026

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @picnixz for commit ccb8d2f 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F149023%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label May 7, 2026
@StanFromIreland StanFromIreland added the needs backport to 3.15 bugs and security fixes label May 7, 2026
@StanFromIreland

StanFromIreland commented May 8, 2026

Copy link
Copy Markdown
Member Author

@picnixz anything I should be checking specifically for, so far it's all unrelated/existing failures, but I'm also not certain as to what I should be looking for exactly?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@StanFromIreland
StanFromIreland merged commit 24b8f12 into python:main May 10, 2026
190 of 195 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label May 10, 2026
@miss-islington-app

miss-islington-app Bot commented May 10, 2026

Copy link
Copy Markdown

Thanks @StanFromIreland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11, 3.12, 3.13, 3.14, 3.15.
🐍🍒⛏🤖

jmcgrath-tractian reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@StanFromIreland
StanFromIreland deleted the expat-entropy branch May 10, 2026 17:36
@miss-islington-app

miss-islington-app Bot commented May 10, 2026

Copy link
Copy Markdown

Sorry, @StanFromIreland, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 24b8f12544468e4cedf5bfbe25442fcd495391e4 3.14
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app miss-islington-app Bot assigned StanFromIreland May 10, 2026
@bedevere-app

bedevere-app Bot commented May 10, 2026

Copy link
Copy Markdown

GH-149645 is a backport of this pull request to the 3.15 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented May 10, 2026

Copy link
Copy Markdown

Sorry, @StanFromIreland, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 24b8f12544468e4cedf5bfbe25442fcd495391e4 3.13
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label May 10, 2026
@miss-islington-app

miss-islington-app Bot commented May 10, 2026

Copy link
Copy Markdown

Sorry, @StanFromIreland, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 24b8f12544468e4cedf5bfbe25442fcd495391e4 3.12
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented May 10, 2026

Copy link
Copy Markdown

Sorry, @StanFromIreland, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 24b8f12544468e4cedf5bfbe25442fcd495391e4 3.11
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented May 10, 2026

Copy link
Copy Markdown

Sorry, @StanFromIreland, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 24b8f12544468e4cedf5bfbe25442fcd495391e4 3.10
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app

bedevere-app Bot commented May 10, 2026

Copy link
Copy Markdown

GH-149646 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label May 10, 2026
@StanFromIreland

StanFromIreland commented May 10, 2026

Copy link
Copy Markdown
Member Author

Moving backport labels to #149646.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@StanFromIreland StanFromIreland removed needs backport to 3.10 needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes needs backport to 3.13 only security fixes labels May 10, 2026
@hartwork

hartwork commented May 11, 2026

Copy link
Copy Markdown
Contributor

@StanFromIreland many thanks for this fix! 🙏

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@david-geiger

david-geiger commented May 13, 2026

Copy link
Copy Markdown

Is there no fix/backport for python 3.13?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@StanFromIreland

StanFromIreland commented May 13, 2026

Copy link
Copy Markdown
Member Author

See #149023 (comment).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@UTsweetyfish UTsweetyfish mentioned this pull request May 14, 2026
python3.12: CVE-2026-7210 deepin-community/sig-deepin-security#380
Open
StanFromIreland added a commit that referenced this pull request Jun 9, 2026
@StanFromIreland
[3.14] gh-149018: Use XML_SetHashSalt16Bytes in pyexpat/`_element…
eeea765
…tree` when possible (GH-149023)

(cherry picked from commit 24b8f12)
@bedevere-app

bedevere-app Bot commented Jun 9, 2026

Copy link
Copy Markdown

GH-151160 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

StanFromIreland added a commit that referenced this pull request Jun 9, 2026
@StanFromIreland
[3.13] gh-149018: Use XML_SetHashSalt16Bytes in pyexpat/`_element…
fc9b11f
…tree` when possible (GH-149023)

(cherry picked from commit 24b8f12)
@bedevere-app

bedevere-app Bot commented Jun 25, 2026

Copy link
Copy Markdown

GH-152188 is a backport of this pull request to the 3.10 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app

bedevere-app Bot commented Aug 7, 2026

Copy link
Copy Markdown

GH-155345 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Yhg1s pushed a commit that referenced this pull request Aug 11, 2026
@StanFromIreland
[3.12] gh-149018: Use XML_SetHashSalt16Bytes in pyexpat/`_element…
e37df2a
…tree` when possible (GH-149023) (#155345)

(cherry picked from commit fc9b11f)
(cherry picked from commit 24b8f12)
@bedevere-app

bedevere-app Bot commented Aug 12, 2026

Copy link
Copy Markdown

GH-155611 is a backport of this pull request to the 3.10 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

pablogsal pushed a commit that referenced this pull request Aug 12, 2026
@StanFromIreland
[3.11] gh-149018: Use XML_SetHashSalt16Bytes in pyexpat/`_element…
cbaecf9
…tree` when possible (GH-149023) (GH-155345) (#155610)

* [3.11] gh-149018: Use `XML_SetHashSalt16Bytes` in `pyexpat`/`_elementtree` when possible (GH-149023) (GH-155345)
(cherry picked from commit e37df2a)

Co-authored-by: Stan Ulbrych <[email protected]>
(cherry picked from commit fc9b11f)
(cherry picked from commit 24b8f12)

* Apply suggestions from code review

Co-authored-by: Stan Ulbrych <[email protected]>
pablogsal pushed a commit that referenced this pull request Aug 13, 2026
@StanFromIreland
[3.10] gh-149018: Use XML_SetHashSalt16Bytes in pyexpat/`_element…
ea70712
…tree` when possible (GH-149023) (#155611)

* [3.10] gh-149018: Use `XML_SetHashSalt16Bytes` in `pyexpat`/`_elementtree` when possible (GH-149023) (GH-155345)
(cherry picked from commit e37df2a)
(cherry picked from commit 95cf26d)

Co-authored-by: Stan Ulbrych <[email protected]>
(cherry picked from commit fc9b11f)
(cherry picked from commit 24b8f12)

* Fix SetHashSalt16Bytes assignment in pyexpat.c
icanhasmath pushed a commit to ActiveState/cpython that referenced this pull request Oct 28, 2026
@StanFromIreland @icanhasmath
[3.10] pythongh-149018: Use XML_SetHashSalt16Bytes in pyexpat/`_e…
7eda8df
…lementtree` when possible (pythonGH-149023) (python#155611)

* [3.10] pythongh-149018: Use `XML_SetHashSalt16Bytes` in `pyexpat`/`_elementtree` when possible (pythonGH-149023) (pythonGH-155345)
(cherry picked from commit e37df2a)
(cherry picked from commit 95cf26d)

Co-authored-by: Stan Ulbrych <[email protected]>
(cherry picked from commit fc9b11f)
(cherry picked from commit 24b8f12)

* Fix SetHashSalt16Bytes assignment in pyexpat.c

(cherry picked from commit ea70712)

3.9.25.x: 3.9 never received pythongh-90949 (the Expat allocation-tracker /
billion-laughs tuning API), so the PyExpat_CAPI capsule gains only the
SetHashSalt16Bytes slot, appended after SetReparseDeferralEnabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gpshead gpshead gpshead approved these changes
@serhiy-storchaka serhiy-storchaka Awaiting requested review from serhiy-storchaka
@picnixz picnixz Awaiting requested review from picnixz picnixz is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@StanFromIreland StanFromIreland

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@StanFromIreland @bedevere-bot @hartwork @david-geiger @gpshead @picnixz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.