FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.14] gh-155292: Don't consider Unicode codepoint attributes outside RFC 3454 (GH-155293) by encukou · Pull Request #156020 · python/cpython · GitHub

Repository navigation

[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

encukou merged 2 commits into
python:3.14from
encukou:backport-7e109d0-3.14

Conversation

encukou commented Aug 18, 2026 •
edited by bedevere-app Bot
Loading

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 requested a review from sethmlarson August 18, 2026 15:13
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 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.

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM, thanks Petr! 🙏

encukou merged commit 1e54caa into python:3.14 Sep 4, 2026
67 checks passed

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 deleted the backport-7e109d0-3.14 branch September 4, 2026 09:29

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

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 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 Bot removed the needs backport to 3.13 only security fixes label Sep 4, 2026

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 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 Bot removed the needs backport to 3.12 only security fixes label Sep 4, 2026

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 Bot removed the needs backport to 3.11 only security fixes label Sep 4, 2026

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.

Yhg1s pushed a commit that referenced this pull request Sep 8, 2026
… RFC 3454 (GH-155293) (GH-156020) (#156930)

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)
The cherry-pick needed reworking as GH-144815 wasn't backported to 3.14
and below, so unassigned characters don't have bidi values.
(cherry picked from commit 1e54caa)
Also, add Unicode_3_2_0_FunctionsTest as in the later versions,
to make the new test work.

Co-authored-by: Seth Larson seth@python.org
Co-authored-by: Stan Ulbrych 89152624+stanfromireland@users.noreply.github.com
Co-authored-by: Petr Viktorin encukou@gmail.com
encukou added a commit that referenced this pull request Sep 9, 2026
… RFC 3454 (GH-155293) (GH-156020) (GH-156922)

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)
The cherry-pick needed reworking as GH-144815 wasn't backported to 3.14
and below, so unassigned characters don't have bidi values.
(cherry picked from commit 1e54caa)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Seth Larson <seth@python.org>
Co-authored-by: Stan Ulbrych <89152624+stanfromireland@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>

---------

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Seth Larson <seth@python.org>
Co-authored-by: Stan Ulbrych <89152624+stanfromireland@users.noreply.github.com>
pablogsal pushed a commit that referenced this pull request Oct 1, 2026
… RFC 3454 (GH-155293) (GH-156020) (#156932)

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

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)
The cherry-pick needed reworking as GH-144815 wasn't backported to 3.14
and below, so unassigned characters don't have bidi values.
(cherry picked from commit 1e54caa)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Seth Larson <seth@python.org>
Co-authored-by: Stan Ulbrych <89152624+stanfromireland@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>

* Add Unicode_3_2_0_FunctionsTest

* Regenerate Unicode data

---------

Co-authored-by: Seth Larson <seth@python.org>
Co-authored-by: Stan Ulbrych <89152624+stanfromireland@users.noreply.github.com>
pablogsal pushed a commit that referenced this pull request Oct 1, 2026
… RFC 3454 (GH-155293) (GH-156020) (#156931)

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

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)
The cherry-pick needed reworking as GH-144815 wasn't backported to 3.14
and below, so unassigned characters don't have bidi values.

Co-authored-by: Seth Larson <seth@python.org>
Co-authored-by: Stan Ulbrych <89152624+stanfromireland@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
(cherry picked from commit 1e54caa)

* Add Unicode_3_2_0_FunctionsTest

* Regenerate Unicode data

---------

Co-authored-by: Seth Larson <seth@python.org>
Co-authored-by: Stan Ulbrych <89152624+stanfromireland@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL