Skip to content

[3.14] gh-155292: Don't consider Unicode codepoint attributes outside RFC 3454 (GH-155293) - #156020

Merged
encukou merged 2 commits into
python:3.14from
encukou:backport-7e109d0-3.14
Sep 4, 2026
Merged

[3.14] gh-155292: Don't consider Unicode codepoint attributes outside RFC 3454 (GH-155293)#156020
encukou merged 2 commits into
python:3.14from
encukou:backport-7e109d0-3.14

Conversation

@encukou

@encukou encukou commented Aug 18, 2026

Copy link
Copy Markdown
Member

Due to a bug, some Unicode codepoint attributes were considered for characters not yet defined in Unicode 3.2.0 or attributes which changed in later Unicode versions. RFC 3454 (StringPrep) requires using Unicode 3.2.0 strictly.

(cherry picked from commit 7e109d0)

sethmlarson and others added 2 commits August 18, 2026 16:46
…RFC 3454 (pythonGH-155293)

Due to a bug, some Unicode codepoint attributes were considered
for characters not yet defined in Unicode 3.2.0 or attributes
which changed in later Unicode versions. RFC 3454 (StringPrep)
requires using Unicode 3.2.0 strictly.

Co-authored-by: Stan Ulbrych <89152624+stanfromireland@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
(cherry picked from commit 7e109d0)
@encukou
encukou requested a review from sethmlarson August 18, 2026 15:13
@encukou encukou changed the title gh-155292: Don't consider Unicode codepoint attributes outside RFC 3454 (GH-155293) [3.14] gh-155292: Don't consider Unicode codepoint attributes outside RFC 3454 (GH-155293) Aug 18, 2026
@encukou

encukou commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

Note that #144815 wasn't backported to 3.14, so unassigned characters don't have bidi values.

@encukou encukou added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Sep 1, 2026
octo-sts-2 Bot pushed a commit to wolfi-dev/os that referenced this pull request Sep 3, 2026
Backport the pending upstream 3.14 backport of the stringprep fix
(python/cpython#156020, upstream issue gh-155292): the stringprep
module consulted the live Unicode database instead of the Unicode
3.2.0 snapshot mandated by RFC 3454, causing IDNA 2003 mismatches
for codepoints added or changed since Unicode 3.2.0.

The patch is the squashed, content-identical form of the two PR
commits and applies onto the v3.14.7 tag.

Signed-off-by: Markus Boehme <markus.boehme@chainguard.dev>

Export:  c199cf44388ce56624c8472d0abf63865c7e7ccc
octo-sts-2 Bot pushed a commit to wolfi-dev/os that referenced this pull request Sep 3, 2026
… for CVE-2026-17084 (#293385)

* fix(python-3.10): backport fix for CVE-2026-17084

The stringprep module consulted the live Unicode database instead of
the Unicode 3.2.0 snapshot mandated by RFC 3454, causing IDNA 2003
mismatches for codepoints added or changed since Unicode 3.2.0
(upstream issue gh-155292).

Upstream has no 3.10 backport PR yet: the fix is queued behind the
still-open 3.14 backport python/cpython#156020, which carries
needs-backport labels for 3.10 through 3.13.

The patch is derived from that PR, with the unidata_version canary
assert in Lib/stringprep.py re-pinned to Unicode 13.0.0 as shipped
with Python 3.10, and the "old = False" test class attribute defined,
which the new test expects but only 3.13+ provide (introduced by the
gh-142681 test refactor that was never backported to security-only
branches). The patch content is otherwise identical to the upstream
PR.

Signed-off-by: Markus Boehme <markus.boehme@chainguard.dev>

* fix(python-3.11): backport fix for CVE-2026-17084

The stringprep module consulted the live Unicode database instead of
the Unicode 3.2.0 snapshot mandated by RFC 3454, causing IDNA 2003
mismatches for codepoints added or changed since Unicode 3.2.0
(upstream issue gh-155292).

Upstream has no 3.11 backport PR yet: the fix is queued behind the
still-open 3.14 backport python/cpython#156020, which carries
needs-backport labels for 3.10 through 3.13.

The patch is derived from that PR, with the unidata_version canary
assert in Lib/stringprep.py re-pinned to Unicode 14.0.0 as shipped
with Python 3.11, and the "old = False" test class attribute defined,
which the new test expects but only 3.13+ provide (introduced by the
gh-142681 test refactor that was never backported to security-only
branches). The patch content is otherwise identical to the upstream
PR.

Signed-off-by: Markus Boehme <markus.boehme@chainguard.dev>

* fix(python-3.12): backport fix for CVE-2026-17084

The stringprep module consulted the live Unicode database instead of
the Unicode 3.2.0 snapshot mandated by RFC 3454, causing IDNA 2003
mismatches for codepoints added or changed since Unicode 3.2.0
(upstream issue gh-155292).

Upstream has no 3.12 backport PR yet: the fix is queued behind the
still-open 3.14 backport python/cpython#156020, which carries
needs-backport labels for 3.10 through 3.13.

The patch is derived from that PR, with the unidata_version canary
assert in Lib/stringprep.py re-pinned to Unicode 15.0.0 as shipped
with Python 3.12, and the "old = False" test class attribute defined,
which the new test expects but only 3.13+ provide (introduced by the
gh-142681 test refactor that was never backported to security-only
branches). The patch content is otherwise identical to the upstream
PR.

Signed-off-by: Markus Boehme <markus.boehme@chainguard.dev>

* fix(python-3.13): backport fix for CVE-2026-17084

The stringprep module consulted the live Unicode database instead of
the Unicode 3.2.0 snapshot mandated by RFC 3454, causing IDNA 2003
mismatches for codepoints added or changed since Unicode 3.2.0
(upstream issue gh-155292).

Upstream has no 3.13 backport PR yet: the fix is queued behind the
still-open 3.14 backport python/cpython#156020, which carries
needs-backport labels for 3.10 through 3.13.

The patch is derived from that PR, with the unidata_version canary
assert in Lib/stringprep.py re-pinned to Unicode 15.1.0 as shipped
with Python 3.13. The patch content is otherwise identical to the
upstream PR.

Signed-off-by: Markus Boehme <markus.boehme@chainguard.dev>

---------

Signed-off-by: Markus Boehme <markus.boehme@chainguard.dev>

Export:  3ab7270fc25d4029c29fb582a68088006a22dd9e

@sethmlarson sethmlarson 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.

LGTM, thanks Petr! 🙏

@encukou
encukou merged commit 1e54caa into python:3.14 Sep 4, 2026
67 checks passed
@miss-islington-app

Copy link
Copy Markdown

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

@encukou
encukou deleted the backport-7e109d0-3.14 branch September 4, 2026 09:29
@miss-islington-app

Copy link
Copy Markdown

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

cherry_picker 1e54caa096678a38afcabecabb1ff72400dd6bae 3.12

@miss-islington-app

Copy link
Copy Markdown

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

cherry_picker 1e54caa096678a38afcabecabb1ff72400dd6bae 3.11

@bedevere-app

bedevere-app Bot commented Sep 4, 2026

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Sep 4, 2026
@miss-islington-app

Copy link
Copy Markdown

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

cherry_picker 1e54caa096678a38afcabecabb1ff72400dd6bae 3.10

@bedevere-app

bedevere-app Bot commented Sep 4, 2026

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Sep 4, 2026
@bedevere-app

bedevere-app Bot commented Sep 4, 2026

Copy link
Copy Markdown

GH-156931 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.11 only security fixes label Sep 4, 2026
@bedevere-app

bedevere-app Bot commented Sep 4, 2026

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.10 only security fixes label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants