Skip to content
OpenAdvisories

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.

Affected products

VendorProductAffectedFixed
Python Software Foundation CPython < 3.13.10, 3.14.0 – < 3.14.1, 3.15.0a1 – < 3.15.0a2 3.13.10

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 pypy3 No fix yet —
Debian 14 python3.14 3.14.2-1 —
Debian 13 pypy3 +1 No fix yet —
Debian 12 pypy3 +1 No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 pypy3 +1 No fix yet —
Ubuntu 26.04 LTS pypy3 +1 No fix yet —
Ubuntu 25.10 pypy3 +2 No fix yet —
Ubuntu 24.04 LTS pypy3 +1 No fix yet —
Ubuntu 22.04 LTS pypy3 +3 No fix yet —
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS pypy3 No fix yet —
Ubuntu Pro 20.04 LTS python2.7 +2 No fix yet —
Ubuntu Pro 18.04 LTS python2.7 +3 No fix yet —
Ubuntu Pro 16.04 LTS python2.7 +1 No fix yet —
Ubuntu Pro 14.04 LTS python2.7 +2 No fix yet —
ReleasePackageFixed inAdvisory
SLES 15 SP7 python311-core 3.11.14-150600.3.44.1 SUSE-SU-2026:0767-1
SLES 15 SP6 python311 +1 3.11.14-150600.3.44.1 SUSE-SU-2026:0767-1
SLES 15 SP5 python311 +2 3.11.14-150400.9.75.1 SUSE-SU-2026:0693-1
SLES 15 SP4 python311 +2 3.11.14-150400.9.75.1 SUSE-SU-2026:0693-1
SLES 3 python311 +1 3.11.14-150600.3.44.1 SUSE-SU-2026:0767-1
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP6 python311 +1 3.11.14-150600.3.44.1 SUSE-SU-2026:0767-1
SLES for SAP 15 SP5 python311 +2 3.11.14-150400.9.75.1 SUSE-SU-2026:0693-1
SLES for SAP 15 SP4 python311 +2 3.11.14-150400.9.75.1 SUSE-SU-2026:0693-1
SLE Micro 6.1 python311 +1 3.11.14-slfo.1.1_3.1 SUSE-SU-2026:20665-1
SLE Micro 6.0 python311 +1 3.11.14-3.1 SUSE-SU-2026:20710-1
SLE HPC 15 SP5 python311 +2 3.11.14-150400.9.75.1 SUSE-SU-2026:0693-1
SLE HPC 15 SP4 python311 +2 3.11.14-150400.9.75.1 SUSE-SU-2026:0693-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python311 3.11.14-4.1 openSUSE-SU-2026:10221-1
openSUSE Tumbleweed python312 3.12.12-5.1 openSUSE-SU-2026:10222-1
openSUSE Tumbleweed python314 3.14.3-1.1 openSUSE-SU-2026:10206-1
openSUSE Tumbleweed python315 3.15.0~a3-4.1 openSUSE-SU-2026:10152-1
openSUSE Leap 15.6 python311 +2 3.11.14-150600.3.44.1 SUSE-SU-2026:0767-1

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 python3 +2 No fix yet —
Azure Linux 2 (CBL-Mariner) python3 No fix yet —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling python-3.10 +1 No fix yet —
Wolfi rolling python-3.12 3.12.16-r2 —
Wolfi rolling python-3.13 3.13.14-r0 —
Wolfi rolling python-3.14 3.14.6-r1 —

Advisories 11

References