Advisory

DEBIAN-CVE-2025-12781

Also known as: CVE-2025-12781

Summary

The record has no summary.

Details

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.

Severity

Medium Basis: CVSS v3 score 5.3, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Dates

Published
2026-01-21 20:16 UTC
Modified
2026-11-01 17:00 UTC

Affected packages and fixes

pypy3

Debian packages (deb) · Debian 12

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

pypy3

Debian packages (deb) · Debian 13

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

pypy3

Debian packages (deb) · Debian 14

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

python3.11

Debian packages (deb) · Debian 12

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

python3.13

Debian packages (deb) · Debian 13

Affected

  • introduced 0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

python3.14

Debian packages (deb) · Debian 14

Affected

  • introduced 0, fixed 3.14.2-1 (ecosystem)

Fixed versions

3.14.2-1

Fix

  • Fixed version 3.14.2-1
    sudo apt-get update && sudo apt-get upgrade

This command upgrades the distribution's packages. Compare the fixed version with the version you have installed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Debian Security Tracker (converted by OSV.dev)

Debian Security Tracker, converted to OSV by OSV.dev.

Sources & licences