bitVakt

Kernel Kit / Infix / v26.10.0latest

CVE-2025-12781

6.3medium

python33.12.14 · 3.12.12 · 3.12.9in 4 of 4 releases

Reach python3 · 8 builds in 4 of 4 releases

full reviewcross-check✓ a member decided

Description · NVD

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.

Published 2026-01-21NVD

CVSS 4.0Network · no privileges · no user interaction

How it is reached

Attack vector
Network
Attack complexity
High
Attack requirements
Present
Privileges required
None
User interaction
None

What it costs

Confidentiality
None
Integrity
Low
Availability
None

What it costs other systems

Confidentiality
None
Integrity
None
Availability
None

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

References 8
Review Av26.10.0x86_64Not exposed✓ accepted by a member, 2026-11-18 · settles 6 of 8

Fable 5.1 · high confidence · 2026-11-05

The unpatched base64.py is in the 3.12.14 source and shipped as /usr/lib/python3.12/base64.pyc: b64decode() still silently maps altchars onto "+/" and urlsafe_b64decode() does the same, with none of the upstream deprecation-warning logic present, and no Buildroot patch touches it.

However, the CVE only matters for callers that pass altchars or use urlsafe_b64decode(), and nothing in the target image does: the only b64decode caller in site-packages is Infix's cli_pretty (standard alphabet, no altchars), and no stdlib or site-packages module on the target references urlsafe_b64decode/altchars (the crypt.pyc hit is _saltchars).

No network-facing service on the device is Python-based. Reaching the affected code path would require a shell on the device to run arbitrary Python that uses an alternate alphabet.

Evidence 11
  1. b64decode() translates altchars to '+/' and calls binascii.a2b_base64 with no check/warning for stray '+' or '/' — the pre-fix behaviour described by the CVE

    output/build/python3-3.12.14/Lib/base64.py:84-88

  2. urlsafe_b64decode() translates '-_' to '+/' and delegates to b64decode(); no fix present

    output/build/python3-3.12.14/Lib/base64.py:132-134

  3. No warnings usage at all in base64.py, confirming the upstream deprecation-warning fix is not backported

    output/build/python3-3.12.14/Lib/base64.py (grep 'import warnings|warn(')

  4. 12 Buildroot patches, all build/option related; none modify Lib/base64.py

    output/build/python3-3.12.14/.applied_patches_list

  5. No entry for gh-125346 in the 3.12.14 changelog

    output/build/python3-3.12.14/Misc/NEWS (grep 125346)

  6. python3 is selected for the target image as .pyc-only stdlib

    output/.config: BR2_PACKAGE_PYTHON3=y, BR2_PACKAGE_PYTHON3_PYC_ONLY=y

  7. The base64 module and interpreter are shipped in the target image

    output/target/usr/lib/python3.12/base64.pyc, output/target/usr/bin/python3

  8. Only base64.pyc (definition) and crypt.pyc (false hit on '_saltchars', see Lib/crypt.py:23) — no caller in the shipped stdlib or site-packages uses the alternate-alphabet path

    grep -rla 'urlsafe_b64decode|altchars' output/target/usr/lib/python3.12

  9. Sole Infix b64decode caller: base64.b64decode(b64val) with no altchars (standard alphabet) — explicitly out of scope per the CVE text; invoked only via the CLI (src/klish-plugin-infix/xml/infix.xml:537,542,1022) by an authenticated operator

    src/statd/python/cli_pretty/cli_pretty.py:4141

  10. No other b64decode callers in shipped Python packages (grep -rla b64decode matched only cli_pretty.pyc)

    output/target/usr/lib/python3.12/site-packages/ (firewall, avahi, dbus, gi, infix_*)

  11. No Python-based network service is started by default; no network path to the base64 alternate-alphabet decode

    board/common/rootfs/etc/finit.d/enabled/ (mstpd, netconf, rauc)

Version and patches

Upstream fix (gh-125346 / PR #141128 and its backports) adds a DeprecationWarning when '+'/'/' appear with altchars or in urlsafe_b64decode(). Python 3.12.14 in this tree does not contain it (no warnings in Lib/base64.py, no NEWS entry); none of the 12 Buildroot patches apply it. NVD's mapping to 3.12.14 is therefore correct. Which later 3.12.x (if any) carries the backport could not be confirmed offline.

Recommendation

Document as N/A for the shipped device (no consumer of altchars/urlsafe_b64decode in the image; the only Infix caller uses the standard alphabet). Pick up the fix with the next routine Python 3.12.x bump; no backport needed. If new Python code is added to the image that uses urlsafe_b64decode()/altchars on untrusted input, revisit.

Open questions

Could not verify offline which 3.12.x release (if any) includes the backport of gh-125346; the CVE's upstream thread should be checked when planning the bump.

Members of Kernel Kit decide. Sign in if you are one.