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

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.51%probability of exploitation in 30 days
40thpercentile

Low risk: more likely to be exploited than 40% of all known CVEs.

References

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.

Start free

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.