CVE-2025-12781
published medium CVSS 4.0 · 6.3base64.b64decode() always accepts "+/" characters, despite setting altchars
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Python Software Foundation | — | CPython0 to < 3.13.10 · 3.14.0 to < 3.14.1 · 3.15.0a1 to < 3.15.0a2 · Other versions: unaffected | Affected | Not stated | PSF |
| Amazon Linux | AL2 | Release evaluation | No Fix Planned | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | No Fix Planned | Not stated | Amazon Linux assessment |
| SUSE / openSUSE | SLE-15-SP4 | libpython3_11-1_0aarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | libpython3_11-1_0ppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | libpython3_11-1_0s390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | libpython3_11-1_0x86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311aarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
Show 95 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | SLE-15-SP4 | python311ppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311s390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311x86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-baseaarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-baseppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-bases390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-basex86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-cursesaarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-cursesppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-cursess390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-cursesx86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-dbmaarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-dbmppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-dbms390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-dbmx86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-develaarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-develppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-devels390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-develx86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-docaarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-docppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-docs390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-docx86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-doc-devhelpaarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-doc-devhelpppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-doc-devhelps390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-doc-devhelpx86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-idleaarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-idleppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-idles390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-idlex86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-tkaarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-tkppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-tks390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-tkx86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-toolsaarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-toolsppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-toolss390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP4 | python311-toolsx86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | libpython3_11-1_0aarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | libpython3_11-1_0ppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | libpython3_11-1_0s390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | libpython3_11-1_0x86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311aarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311ppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311s390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311x86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-baseaarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-baseppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-bases390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-basex86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-cursesaarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-cursesppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-cursess390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-cursesx86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-dbmaarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-dbmppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-dbms390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-dbmx86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-develaarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-develppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-devels390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-develx86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-docaarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-docppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-docs390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-docx86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-doc-devhelpaarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-doc-devhelpppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-doc-devhelps390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-doc-devhelpx86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-idleaarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-idleppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-idles390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-idlex86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-tkaarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-tkppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-tks390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-tkx86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-toolsaarch64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-toolsppc64le | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-toolss390x | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP5 | python311-toolsx86_64 | Advisory build | 3.11.14-150400.9.75.1 | SUSE-SU-2026:0693-1 |
| SUSE / openSUSE | SLE-15-SP6 | libpython3_11-1_0aarch64 | Advisory build | 3.11.14-150600.3.44.1 | SUSE-SU-2026:0767-1 |
| SUSE / openSUSE | SLE-15-SP6 | libpython3_11-1_0ppc64le | Advisory build | 3.11.14-150600.3.44.1 | SUSE-SU-2026:0767-1 |
| SUSE / openSUSE | SLE-15-SP6 | libpython3_11-1_0s390x | Advisory build | 3.11.14-150600.3.44.1 | SUSE-SU-2026:0767-1 |
| SUSE / openSUSE | SLE-15-SP6 | libpython3_11-1_0x86_64 | Advisory build | 3.11.14-150600.3.44.1 | SUSE-SU-2026:0767-1 |
| SUSE / openSUSE | SLE-15-SP6 | python311aarch64 | Advisory build | 3.11.14-150600.3.44.1 | SUSE-SU-2026:0767-1 |
| SUSE / openSUSE | SLE-15-SP6 | python311ppc64le | Advisory build | 3.11.14-150600.3.44.1 | SUSE-SU-2026:0767-1 |
| SUSE / openSUSE | SLE-15-SP6 | python311s390x | Advisory build | 3.11.14-150600.3.44.1 | SUSE-SU-2026:0767-1 |
| SUSE / openSUSE | SLE-15-SP6 | python311x86_64 | Advisory build | 3.11.14-150600.3.44.1 | SUSE-SU-2026:0767-1 |
| SUSE / openSUSE | SLE-15-SP6 | python311-baseaarch64 | Advisory build | 3.11.14-150600.3.44.1 | SUSE-SU-2026:0767-1 |
| SUSE / openSUSE | SLE-15-SP6 | python311-baseppc64le | Advisory build | 3.11.14-150600.3.44.1 | SUSE-SU-2026:0767-1 |
| SUSE / openSUSE | SLE-15-SP6 | python311-bases390x | Advisory build | 3.11.14-150600.3.44.1 | SUSE-SU-2026:0767-1 |
| SUSE / openSUSE | SLE-15-SP6 | python311-basex86_64 | Advisory build | 3.11.14-150600.3.44.1 | SUSE-SU-2026:0767-1 |
Package entries are limited to the first 100 builds and 100 linked advisories.
Description
When passing data to the b64decode(), standard_b64decode(), and urlsafe_b64decode() functions in the "base64" module the characters "+/" will always be accepted, regardless of the value of "altchars" parameter, typically used to establish an "alternative base64 alphabet" such as the URL safe alphabet. This behavior matches what is recommended in earlier base64 RFCs, but newer RFCs now recommend either dropping characters outside the specified base64 alphabet or raising an error. The old behavior has the possibility of causing data integrity issues. This behavior can only be insecure if your application uses an alternate base64 alphabet (without "+/"). If your application does not use the "altchars" parameter or the urlsafe_b64decode() function, then your application does not use an alternative base64 alphabet. The attached patches DOES NOT make the base64-decode behavior raise an error, as this would be a change in behavior and break existing programs. Instead, the patch deprecates the behavior which will be replaced with the newly recommended behavior in a future version of Python. Users are recommended to mitigate by verifying user-controlled inputs match the base64 alphabet they are expecting or verify that their application would not be affected if the b64decode() functions accepted "+" or "/" outside of altchars.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 6.3 / 10
- Severity
- medium
- Provider
- PSF · cna
- Vector string
- CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Python Software Foundation | CPython | 0 to < 3.13.10 (affected · python)3.14.0 to < 3.14.1 (affected · python)3.15.0a1 to < 3.15.0a2 (affected · python)Default: unaffected | PSF · cna |
Weaknesses
1- CWE-704 CWE-704 Incorrect Type Conversion or Cast
References
8- https://github.com/python/cpython/commit/13360efd385d1a7d0659beba03787ea3d063ef9b
- https://github.com/python/cpython/commit/1be80bec7960f5ccd059e75f3dfbd45fca302947
- https://github.com/python/cpython/commit/9060b4abbe475591b6230b23c2afefeff26fcca5
- https://github.com/python/cpython/commit/e95e783dff443b68e8179fdb57737025bf02ba76
- https://github.com/python/cpython/commit/fd17ee026fa9b67f6288cbafe374a3e479fe03a5
- https://github.com/python/cpython/issues/125346
- https://github.com/python/cpython/pull/141128
- https://mail.python.org/archives/list/[email protected]/thread/KRI7GC6S27YV5NJ4FPDALS2WI5ENAFJ6/
Provider assertions
2PSF · cna
base64.b64decode() always accepts "+/" characters, despite setting altchars
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 50c15e6e218aba4ea99940659a420528cb602a398e782db0920c4720b73ce4c5
- Ingested
- 23 Sep 2026, 08:36:53 UTC
- Source record
- Official CVE record