Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2025-12781

published medium CVSS 4.0 · 6.3

base64.b64decode() always accepts "+/" characters, despite setting altchars

Published
21 Jan 2026, 19:34:47 UTC
Updated
22 Jan 2026, 20:12:56 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Python Software Foundation — CPython0 to < 3.13.10 · 3.14.0 to < 3.14.1 · 3.15.0a1 to < 3.15.0a2 · Other versions: unaffected Affected Not stated PSF
Amazon Linux AL2 Release evaluation No Fix Planned Not stated Amazon Linux assessment
Amazon Linux AL2023 Release evaluation No Fix Planned Not stated Amazon Linux assessment

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.

en · PSF · cna

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
4.0
Base score
6.3 / 10
Severity
medium
Provider
PSF · cna
Vector string
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Scenarios
en: GENERAL

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Python Software Foundation CPython 0 to < 3.13.10 (affected · python)3.14.0 to < 3.14.1 (affected · python)3.15.0a1 to < 3.15.0a2 (affected · python)Default: unaffected PSF · cna

Weaknesses

1
  • CWE-704 CWE-704 Incorrect Type Conversion or Cast (CISA-ADP · adp)

References

8

Provider assertions

2

PSF · cna

base64.b64decode() always accepts "+/" characters, despite setting altchars

CISA-ADP · adp

CISA ADP Vulnrichment

Provenance

Schema
5.2
Searchable
yes
Content hash
50c15e6e218aba4ea99940659a420528cb602a398e782db0920c4720b73ce4c5
Ingested
23 Sep 2026, 08:36:53 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected