CVE-2025-12781
MEDIUMDescription
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.
How to fix
TridentStack Control can deploy fixes like this automatically across your Windows, macOS, and Linux fleet. See how it works
Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.
CVSS v3 Vector
Exploitability
Impact
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Exploit Intelligence
Moderate risk: more likely to be exploited than 43% of all known CVEs.
References
Related Vulnerabilities
Other CWE-704 vulnerabilities, ordered by exploit likelihood. View all
| CVE | Severity | CVSS | EPSS | Exploited | Fix |
|---|---|---|---|---|---|
| CVE-2025-41646 | Critical | 9.8 | 47% | - | Fix |
| CVE-2017-5115 | High | 8.8 | 26% | - | Fix |
| CVE-2018-3843 | High | 8.8 | 24% | - | - |
| CVE-2018-12453 | High | 7.5 | 24% | - | Fix |
| CVE-2017-3106 | High | 8.8 | 22% | - | - |
| CVE-2018-5007 | High | 8.8 | 18% | - | - |
Common questions
How do I fix CVE-2025-12781?
Published advisories record a fix for 6 affected products. The "How to fix" section on this page lists the fixed version and source advisory for each one, so apply the entry matching what you actually run.
Is CVE-2025-12781 being actively exploited?
Not that we know of. CVE-2025-12781 is not in the CISA Known Exploited Vulnerabilities catalog. Its EPSS score of 0.53% is the estimated probability that it will be exploited in the next 30 days. That is higher than 43% of all scored CVEs.
How severe is CVE-2025-12781?
CVE-2025-12781 has a CVSS v3 base score of 5.3, rated medium. CVSS rates the technical impact if the vulnerability is exploited, not how likely that is, so weigh it alongside the exploit-prediction score when you decide what to patch first.
What does CVE-2025-12781 affect?
Published advisories record a fix for Python 2 (Windows application), Python 3.10 (Windows application), Python 3.11 (Windows application), Python 3.12 (Windows application), and 2 more. Only products with a sourced advisory are listed, so treat this as what we can cite rather than a complete inventory.
Embed a live status badge for CVE-2025-12781
Markdown
[](https://tridentstack.com/cve/CVE-2025-12781)HTML
<a href="https://tridentstack.com/cve/CVE-2025-12781"><img src="https://tridentstack.com/cve/badge/CVE-2025-12781.svg" alt="CVE-2025-12781"></a>Find and fix vulnerabilities across your fleet
TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.
This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2026-02-02.