CVE-2025-12781
No exploitation reported by the sources we read.
- Published2026-01-21
- Fixed in3.14.1 · 3.13.10
- WeaknessCWE-704
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
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.
Timeline
dates in UTC- 2026-01-2120:16CVE publishedNVD
Versions per branch
NVD · OSV| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 3.14 | ≥ 3.14.0, < 3.14.1 | 3.14.1 | NVD |
| 3.13 | < 3.13.10 | 3.13.10 | NVD |
| 3.15 | = 3.15.0 | no fix published | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 3.15 | < 3.15.0 | 3.15.0 | OSV |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 3.15 | < 3.15.0 | 3.15.0 | OSV |
1 more product in the sources.
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Products declared by the CNA1 product
As PSF, the CNA that assigned this CVE, declared them in the CVE record; versions as written.
- Python Software Foundation CPythonother versions: not affected
https://github.com/python/cpython
Affected- < 3.13.10fixed in 3.13.10python
- ≥ 3.14.0, < 3.14.1fixed in 3.14.1python
- ≥ 3.15.0a1, < 3.15.0a2fixed in 3.15.0a2python
Source: the CNA record (CVE Program), © The MITRE Corporation,CVE Terms of UseCVE recordupdated 2026-01-22
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- miniforge3CleanStartall versions · fixed in 25.11.0.1-r6
- miniforge3CleanStartall versions · fixed in 26.1.1.3-r4
- miniforge3CleanStartall versions · fixed in 26.3.2.3-r6
- pypy3Ubuntu:26.10all versions · no fixed version listedand 1 other package
- pypy3Ubuntu:26.04:LTSall versions · no fixed version listedand 1 other package
- pypy3Ubuntu:25.10all versions · no fixed version listedand 2 other packages
- pypy3Ubuntu:24.04:LTSall versions · no fixed version listedand 1 other package
- pypy3Ubuntu:22.04:LTSall versions · no fixed version listedand 3 other packages
68 more package ranges on OSV.dev
Vendor advisories
cpython: base64.b64decode() always accepts "+/" characters, despite setting altchars
firefox.src as a component of Red Hat Enterprise Linux 10 · python3.12.src as a component of Red Hat Enterprise Linux 10 · python3.14.src as a component of Red Hat Enterprise Linux 10 · +201 more
Fix
- Update Python to 3.14.1 · 3.13.10
- Workaround from the vendor Red Hat Product Security CVE-2025-12781 · 204 productsTo mitigate this issue, implement manual input validation before calling the base64 functions with an alternative alphabet, ensuring to reject any string containing the standard base64 characters, such as '+' and '/', that are not part of the expected alphabet.
- No fix available, says the vendor Red Hat Product Security CVE-2025-12781 · 200 productsFix deferred
- No fix planned, says the vendor Red Hat Product Security CVE-2025-12781 · 4 productsWill not fix
Advisories and patches
- github.comPatch
- github.comPatch
- github.comPatch
- github.comPatch
- github.comPatch
- github.comPatch
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- PoC-in-GitHubno public repository identifiedread 2026-11-18
- Metasploit modules
- none listed Metasploit Framework
Sources
- CISA-ADPSSVC decisionnone2026-01-22
- CNACVSS 4.06.3known since 2026-10-23
- NVDCVSS 3.15.3read 2026-10-23
- CISA-ADPweakness (CWE)CWE-7042026-01-22
- FIRST EPSSEPSS score0.9 %2026-11-17
- OSVaffected packages—
- GitHub Advisoriesadvisory—
Identifiers
- AZL-109683same flawAzure Linux · MIT
- AZL-75225same flawAzure Linux · MIT
- AZL-75231same flawAzure Linux · MIT
- AZL-84287same flawAzure Linux · MIT
- BIT-libpython-2025-12781same flawBitnami · Apache-2.0
- BIT-python-2025-12781same flawBitnami · Apache-2.0
- BIT-python-min-2025-12781same flawBitnami · Apache-2.0
- CGA-34m3-pqv7-q76psame flawChainguard · CC-BY-NC-ND-4.0
- CGA-3f4q-3vqj-xhx7same flawChainguard · CC-BY-NC-ND-4.0
- CGA-3mjq-5c23-prmpsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-4mf7-96v4-52mjsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-72qp-7wjg-2v7qsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-8w6w-j788-x97qsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-fmgm-45cx-6m2fsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-m2h9-8f76-h5pwsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-p288-9mv5-m48fsame flawChainguard · CC-BY-NC-ND-4.0
- CGA-qm9w-v5cx-mm74same flawChainguard · CC-BY-NC-ND-4.0
- CGA-x4f5-663c-vj94same flawChainguard · CC-BY-NC-ND-4.0
- CGA-xp35-jg4m-v7xgsame flawChainguard · CC-BY-NC-ND-4.0
- EUVD-2026-3598same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-hfpw-x3fg-wmmgsame flawGitHub Advisory Database · CC-BY-4.0
- MINI-4rp5-6j95-7fw4same flawMinimOS · LicenseRef-unstated
- MINI-m46w-6g95-3rfpsame flawMinimOS · LicenseRef-unstated
- MINI-r2jq-j369-2r72same flawMinimOS · LicenseRef-unstated
- MINI-rv7h-86w8-4rmqsame flawMinimOS · LicenseRef-unstated
- MINI-wcp7-6fr5-r7x8same flawMinimOS · LicenseRef-unstated
- PSF-2026-7same flawPython Software Foundation · CC-BY-4.0
- MGASA-2026-0455advisory covering several CVEsMageia · LicenseRef-unstated
- OESA-2026-1356advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2026-1357advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2026-1358advisory covering several CVEsopenEuler · LicenseRef-unstated
- OESA-2026-1461advisory covering several CVEsopenEuler · LicenseRef-unstated
- openSUSE-SU-2026:10152-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2026:10206-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2026:10221-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2026:10222-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- SUSE-SU-2026:0693-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2026:0767-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2026:20665-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2026:20710-1advisory covering several CVEsSUSE · LicenseRef-unstated
Technical details
- CVSS v3 Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- CVSS 4.0 vector
- 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- Published
- 2026-01-21
- Last Modified
- 2026-06-17
- NVD status
- Analyzed
- GitHub Advisory
- GHSA-hfpw-x3fg-wmmg
Frequently asked questions
What is CVE-2025-12781?
Is CVE-2025-12781 actively exploited?
What is the CVSS score for CVE-2025-12781?
Running Python? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website lookups · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-hfpw-x3fg-wmmg
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0
- CISA Vulnrichment · CC0-1.0