CVE-2025-12781
Fixed in a distro release EPSS <1%CVSS 6.3
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.
Products: Python Software Foundation CPython
Distro releases
| Release | Package | Fixed in |
|---|---|---|
| Chainguard | python-3.10 | no fix |
| Chainguard | python-3.11 | no fix |
| Chainguard | python-3.12 | no fix |
| Chainguard | python-3.13 | 3.13.14-r0 |
| Chainguard | python-3.14 | 3.14.6-r1 |
| Chainguard | python-3.9 | no fix |
| Debian 12 | pypy3 | no fix |
| Debian 12 | python3.11 | no fix |
| Debian 13 | pypy3 | no fix |
| Debian 13 | python3.13 | no fix |
| Debian 14 | pypy3 | no fix |
| Debian 14 | python3.13 | no fix |
| Debian 14 | python3.14 | 3.14.2-1 |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | python311 | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | python311-core | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS | python311-documentation | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | python311 | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | python311-core | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS | python311-documentation | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | python311 | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | python311-core | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS | python311-documentation | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | python311 | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | python311-core | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise High Performance Computing 15 SP5-LTSS | python311-documentation | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise Module for Basesystem 15 SP7 | python311-core | 3.11.14-150600.3.44.1 |
| SUSE Linux Enterprise Module for Public Cloud 15 SP4 | python311 | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise Module for Public Cloud 15 SP4 | python311-core | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise Module for Python 3 15 SP7 | python311 | 3.11.14-150600.3.44.1 |
| SUSE Linux Enterprise Module for Python 3 15 SP7 | python311-core | 3.11.14-150600.3.44.1 |
| SUSE Linux Enterprise Server 15 SP4-LTSS | python311 | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise Server 15 SP4-LTSS | python311-core | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise Server 15 SP4-LTSS | python311-documentation | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise Server 15 SP5-LTSS | python311 | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise Server 15 SP5-LTSS | python311-core | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise Server 15 SP5-LTSS | python311-documentation | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise Server 15 SP6-LTSS | python311 | 3.11.14-150600.3.44.1 |
| SUSE Linux Enterprise Server 15 SP6-LTSS | python311-core | 3.11.14-150600.3.44.1 |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | python311 | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | python311-core | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise Server for SAP Applications 15 SP4 | python311-documentation | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | python311 | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | python311-core | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise Server for SAP Applications 15 SP5 | python311-documentation | 3.11.14-150400.9.75.1 |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | python311 | 3.11.14-150600.3.44.1 |
| SUSE Linux Enterprise Server for SAP Applications 15 SP6 | python311-core | 3.11.14-150600.3.44.1 |
| SUSE Linux Micro 6.0 | python311 | 3.11.14-3.1 |
| SUSE Linux Micro 6.0 | python311-core | 3.11.14-3.1 |
| SUSE Linux Micro 6.1 | python311 | 3.11.14-slfo.1.1_3.1 |
| SUSE Linux Micro 6.1 | python311-core | 3.11.14-slfo.1.1_3.1 |
| Ubuntu 20.04 LTS | pypy3 | no fix |
| Ubuntu 22.04 LTS | pypy3 | no fix |
| Ubuntu 22.04 LTS | python2.7 | no fix |
| Ubuntu 22.04 LTS | python3.10 | no fix |
| Ubuntu 22.04 LTS | python3.11 | no fix |
| Ubuntu 24.04 LTS | pypy3 | no fix |
| Ubuntu 24.04 LTS | python3.12 | no fix |
| Ubuntu 25.10 | pypy3 | no fix |
| Ubuntu 25.10 | python3.13 | no fix |
| Ubuntu 25.10 | python3.14 | no fix |
| Ubuntu 26.04 LTS | pypy3 | no fix |
| Ubuntu 26.04 LTS | python3.14 | no fix |
| Ubuntu 26.10 | pypy3 | no fix |
| Ubuntu 26.10 | python3.14 | no fix |
| Ubuntu Pro 14.04 LTS | python2.7 | no fix |
| Ubuntu Pro 14.04 LTS | python3.4 | no fix |
| Ubuntu Pro 14.04 LTS | python3.5 | no fix |
| Ubuntu Pro 16.04 LTS | python2.7 | no fix |
| Ubuntu Pro 16.04 LTS | python3.5 | no fix |
| Ubuntu Pro 18.04 LTS | python2.7 | no fix |
| Ubuntu Pro 18.04 LTS | python3.6 | no fix |
| Ubuntu Pro 18.04 LTS | python3.7 | no fix |
| Ubuntu Pro 18.04 LTS | python3.8 | no fix |
| Ubuntu Pro 20.04 LTS | python2.7 | no fix |
| Ubuntu Pro 20.04 LTS | python3.8 | no fix |
| Ubuntu Pro 20.04 LTS | python3.9 | no fix |
| Wolfi | python-3.10 | no fix |
| Wolfi | python-3.11 | no fix |
| Wolfi | python-3.12 | no fix |
| Wolfi | python-3.13 | 3.13.14-r0 |
| Wolfi | python-3.14 | 3.14.6-r1 |
| openSUSE Leap 15.6 | python311 | 3.11.14-150600.3.44.1 |
| openSUSE Leap 15.6 | python311-core | 3.11.14-150600.3.44.1 |
| openSUSE Leap 15.6 | python311-documentation | 3.11.14-150600.3.44.1 |
| openSUSE Tumbleweed | python311 | 3.11.14-4.1 |
| openSUSE Tumbleweed | python312 | 3.12.12-5.1 |
| openSUSE Tumbleweed | python314 | 3.14.3-1.1 |
| openSUSE Tumbleweed | python315 | 3.15.0~a3-4.1 |