Vulnerability · CVE-2025-12781
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
Published Jan 21, 2026 · catalog updated Oct 16, 2026 · When passing data to
Check if you run it
No confirmed exploitation is on record for CVE-2025-12781. EPSS is 0.57%. Act only if a listed version of When passing data to is installed.
Gaps on this record
- The stored product name is a package slug. The name on this page is taken from the title (When passing data to).
- No vendor fix or required action is stored. Compare the linked advisory before you change production.
- Severity
- Medium5.3
- Known exploitation
- Not in CISA/VulnCheck KEV
- EPSS
- 0.57%
- Remediation
- Advisory link
- Affected products
- Debian:12 pypy3 · Debian:12 python3.11 · Debian:13 pypy3 · Debian:13 python3.13 · Debian:14 pypy3 · Debian:14 python3.13
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.
Are you affected?
Enter the version you run. The result uses only the ranges stored on this record.
The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.
- Debian:12 pypy37.3.11+dfsg-2, 7.3.11+dfsg-2+deb12u1, 7.3.11+dfsg-2+deb12u2
- Debian:12 python3.113.11.2-6, 3.11.2-6+deb12u1, 3.11.2-6+deb12u2
- Debian:13 pypy37.3.19+dfsg-2, 7.3.20+dfsg-1, 7.3.20+dfsg-2
- Debian:13 python3.133.13.11-1, 3.13.12-1, 3.13.14-1
- Debian:14 pypy37.3.19+dfsg-2, 7.3.20+dfsg-1, 7.3.20+dfsg-2
- Debian:14 python3.133.13.11-1, 3.13.12-1, 3.13.14-1
- Debian:14 python3.140 → 3.14.2-1
How to fix CVE-2025-12781
Recommended remediation
A patch or advisory reference is linked. Open the original publisher for availability by product version.
Official advisories
What to do
Three questions, each answered from this record only. Confirm the vendor advisory before you patch.
Should you patch?
No confirmed exploitation is on record for CVE-2025-12781. EPSS is 0.57%. Act only if a listed version of When passing data to is installed.
Which versions are affected?
Compare what you have installed with 7.3.11+dfsg-2, 7.3.11+dfsg-2+deb12u1, 7.3.11+dfsg-2+deb12u2, 3.11.2-6, 3.11.2-6+deb12u1, 3.11.2-6+deb12u2, 7.3.19+dfsg-2, 7.3.20+dfsg-1, 7.3.20+dfsg-2, 3.13.11-1, 3.13.12-1, 3.13.14-1, 0 → 3.14.2-1. Compare the installed version with the linked vendor advisory before you change production.
What should an analyst verify?
No weakness class is stored. EPSS 0.57%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.
Technology hubs
Code
The project this record applies to. Exploit listings stay in References.
No public source repository is identified for this product.
Timeline
Detection, updates, and resolution for this record.
Jan 21, 2026 · OpenSSF OSV / OSV Scanner
Detected
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 ei
Oct 16, 2026 · OpenSSF OSV / OSV Scanner
Fix available
python3.14 fixed in 3.14.2-1
Oct 16, 2026 · OpenSSF OSV / OSV Scanner
Fix available
python3.14 fixed in 3.14.2-1
Oct 16, 2026 · OpenSSF OSV / OSV Scanner
Updated
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 ei
Sources
- CVE.orgVulnerability recordCVE-2025-12781
Official CVE identifier
cve.org - FIRST EPSSExploitation probabilityCVE-2025-12781
30-day exploitation probability 0.6%
first.org - OpenSSF OSV / OSV ScannerPackage advisoryDEBIAN-CVE-2025-12781osv.dev
References
Freshness
Last verified in this catalog Oct 16, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.