CVE & CISA-KEV Catalog

CVE-2025-12781

MEDIUM
5.3
CVSS v3
NVD

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.

How to fix

Remediation Available
Python 2Windows application
Affected:3.13.10Fixed in:3.13.10Python Software Foundation
Affected:3.14.0 3.14.1Fixed in:3.14.1Python Software Foundation
Python 3.10Windows application
Affected:3.14.0 3.14.1Fixed in:3.14.1Python Software Foundation
Affected:3.13.10Fixed in:3.13.10Python Software Foundation
Python 3.11Windows application
Affected:3.13.10Fixed in:3.13.10Python Software Foundation
Affected:3.14.0 3.14.1Fixed in:3.14.1Python Software Foundation
Python 3.12Windows application
Affected:3.14.0 3.14.1Fixed in:3.14.1Python Software Foundation
Affected:3.13.10Fixed in:3.13.10Python Software Foundation
Python 3.8Windows application
Affected:3.14.0 3.14.1Fixed in:3.14.1Python Software Foundation
Affected:3.13.10Fixed in:3.13.10Python Software Foundation
Python 3.9Windows application
Affected:3.13.10Fixed in:3.13.10Python Software Foundation
Affected:3.14.0 3.14.1Fixed in:3.14.1Python Software Foundation

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

Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityNone
IntegrityLow
AvailabilityNone

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Exploit Intelligence

0.53%probability of exploitation in 30 days
43rdpercentile

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

CVESeverityCVSSEPSSExploitedFix
CVE-2025-41646Critical9.847%-Fix
CVE-2017-5115High8.826%-Fix
CVE-2018-3843High8.824%--
CVE-2018-12453High7.524%-Fix
CVE-2017-3106High8.822%--
CVE-2018-5007High8.818%--

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
CVE-2025-12781 severity badge

Markdown

[![CVE-2025-12781](https://tridentstack.com/cve/badge/CVE-2025-12781.svg)](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.

See how it worksStart freeThis CVE lookup is free and always will be.

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.