CVE-2025-12781

Aliases:UBUNTU-CVE-2025-12781DEBIAN-CVE-2025-12781CGA-34m3-pqv7-q76pCGA-3mjq-5c23-prmpCGA-4mf7-96v4-52mjCGA-72qp-7wjg-2v7qCGA-8w6w-j788-x97qCGA-m2h9-8f76-h5pwCGA-p288-9mv5-m48fCGA-3f4q-3vqj-xhx7CGA-fmgm-45cx-6m2fCGA-qm9w-v5cx-mm74CGA-x4f5-663c-vj94CGA-xp35-jg4m-v7xg
Analyzed
Published: 21 Jan 2026, 19:34
Last modified:22 Jan 2026, 20:12

Vulnerability Summary

Overall Risk (default)
medium
35/100
CVSS Score
6.3 MEDIUM
v4.0 (cve.org)
EPSS Score
0.57% LOW
1% probability +0.55%
KEV
Not listed
Ransomware
No reports
Public exploits
1 found
Dark Web
Not detected

Timeline

21 Jan 2026, 19:34
Published
Vulnerability first disclosed
22 Jan 2026, 20:12
Last Modified
Vulnerability information updated

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.

CVSS Metrics

  • v4.0MEDIUMScore: 6.3CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
  • v4.0MEDIUMScore: 6.3CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • v3.1MEDIUMScore: 5.3CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

EPSS Trends

Current EPSS score: 0.57% Percentile: 46%

Techniques & Countermeasures

  • CWE-704Incorrect Type Conversion or Cast

    The product does not correctly convert an object, resource, or structure from one type to a different type.

Affected Systems

  • chainguardpython-3.10

    all

  • chainguardpython-3.11

    all

  • chainguardpython-3.12

    all

  • chainguardpython-3.13

    < 3.13.14-r0

  • chainguardpython-3.14

    < 3.14.6-r1

  • chainguardpython-3.9

    all

  • wolfipython-3.10

    all

  • wolfipython-3.11

    all

  • wolfipython-3.12

    all

  • wolfipython-3.13

    < 3.13.14-r0

  • wolfipython-3.14

    < 3.14.6-r1

  • debianpypy3

    all | all | all | all

  • debianpython3.11

    all

  • debianpython3.13

    all | all

  • debianpython3.14

    all

  • debianpython3.9

    all

  • ubuntupypy3

    all | all | all | all | all

  • ubuntupython2.7

    all | all

  • ubuntupython3.10

    all

  • ubuntupython3.11

    all

  • ubuntupython3.12

    all

  • ubuntupython3.13

    all

  • ubuntupython3.14

    all | all

  • ubuntupython3.4

    all

  • ubuntupython3.5

    all

  • ubuntupython3.6

    all

  • ubuntupython3.7

    all

  • ubuntupython3.8

    all

  • ubuntupython3.9

    all

  • python software foundationcpython

    < 3.13.10 | ≥ 3.14.0, < 3.14.1 | ≥ 3.15.0a1, < 3.15.0a2

  • pythonpython

    < 3.13.10 | ≥ 3.14.0, < 3.14.1 | 3.15.0:alpha1

References (14)