CVE-2025-12781
CVE-2025-12781 — base64.b64decode() always accepts "+/" characters, despite setting altchars
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…
Published Updated Sources: cvelistV5, PSF
Triage
Is it exploited, how likely is exploitation, what does it touch, and how severe do the scoring sources call it.
Exploitation
Unreported
no source claims exploitation
EPSS
<1%
chance of exploitation in 30 days
CVSS base
6.3
MEDIUM
CISA SSVC assessment
Three decision points CISA publishes for the CVEs it assesses · SSVC 2.0.3. A stakeholder decision, not a severity score.
Exploitation
None
none · proof-of-concept · active
Automatable
No
can an attacker script all four kill-chain steps
Technical impact
Partial
partial · total control of the vulnerable component
Affected scope
The catalog records vendors and products as separate lists, not pairs, so which product belongs to which vendor is not something this page can say.
Vendors (1)
Products (1)
Every base score collected
Sources score independently and disagree; each row says who scored it and under which version.
| Score | Version | Severity | Expl. | Impact | Source |
|---|---|---|---|---|---|
| 6.3 | CVSS 4.0 | MEDIUM | n/a | n/a | cvelistV5 |
Weakness & attack patterns
- CWE-704
References
8 on the record
- github.com/python/cpython/pull/141128
patch
- github.com/python/cpython/issues/125346
issue-tracking
- mail.python.org/archives/list/[email protected]/thread/KRI7GC6S27YV5NJ4FPDALS2WI5ENAFJ6/
vendor-advisory
- github.com/python/cpython/commit/13360efd385d1a7d0659beba03787ea3d063ef9b
patch
- github.com/python/cpython/commit/1be80bec7960f5ccd059e75f3dfbd45fca302947
patch
- github.com/python/cpython/commit/9060b4abbe475591b6230b23c2afefeff26fcca5
patch
- github.com/python/cpython/commit/e95e783dff443b68e8179fdb57737025bf02ba76
patch
- github.com/python/cpython/commit/fd17ee026fa9b67f6288cbafe374a3e479fe03a5
patch
Related CVEs
Same product first, then the same weakness or threat actor.
- CVE-2026-115557 Distrust compromised intermediate certificates in ssl moduleCVSS 9.4
- CVE-2026-15826 User Profile Builder <= 3.16.4 - Unauthenticated Authentication Bypass via Type Confusion to Administrator Account Takeover via 'username' ParameterCVSS 9.8
- CVE-2026-10080 Boards plugin panics on WebSocket command with non-string field typesCVSS 6.5
- CVE-2026-18675 Kong Mesh: control plane denial of service via a malformed dataplane token with a non-string JWT kidCVSS 5.3
Elsewhere on this site
- Python Software Foundationevery CVE for this vendor
- CWE-704other pages naming this weakness
Not in any source we poll
Listed rather than left blank: an empty field and an unmeasured one look identical on screen, and only one is a reason to look elsewhere.
- No confirmed IOCs, IP addresses, domains, file hashes, or malware artifacts supplied.
- No organization-specific asset inventory, compensating-control status, or patch deployment evidence supplied.
- No exploit packet captures, log samples, or incident case IDs supplied.