CVE-2025-12781
base64.b64decode() always accepts "+/" characters, despite setting altchars
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.
Exposure status: unknown. This page does not establish whether an installed system is affected or corrected.
Severity and exploitation evidence
EPSS: 0.859% · score date 2026-11-19. EPSS is an estimated probability over the next 30 days, not proof of exploitation.
CISA KEV: not included in the checked catalog; exploitation may still occur. Last checked: 2026-11-19T16:57:41.748Z. Public exploit availability is not used to set this status.
CVSS 4.0 · 6.3 · published by PSFCVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Assessment source · checked 2026-11-19T12:57:24.638Z
CVSS 4.0 · 6.3 · published by Ubuntu SecurityCVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
Assessment source · checked 2026-11-19T16:49:50.556Z
CVSS 3.1 · 5.3 · published by Ubuntu SecurityCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Assessment source · checked 2026-11-19T16:49:50.556Z
Verification by field
| Field | Status | Checked at (UTC) | Source |
|---|---|---|---|
| kev | verified | 2026-11-19T16:57:41.748Z | CISA KEV |
| cvss | verified | 2026-11-19T12:57:24.638Z | CVE Program |
| epss | verified | 2026-11-19T16:04:40.125Z | FIRST EPSS |
| patches | unknown | unknown | unknown |
| affected | verified | 2026-11-19T12:57:24.638Z | CVE Program |
| lifecycle | verified | 2026-11-19T12:57:24.638Z | CVE Program |
Affected versions and configuration
Python Software Foundation CPython; modules: base64; default status: unaffected: 0 to < 3.13.10 [affected; scheme: python]; 3.14.0 to < 3.14.1 [affected; scheme: python]; 3.15.0a1 to < 3.15.0a2 [affected; scheme: python]
Defaults, conditional configuration, package status and version schemes are retained below. A version range alone is not an exposure verdict.
Ubuntu Security · ubuntu-package · full conditions
[
{
"name": "python3.12",
"debian": "https://tracker.debian.org/pkg/python3.12",
"source": "https://ubuntu.com/security/cve?package=python3.12",
"ubuntu": "https://packages.ubuntu.com/search?suite=all§ion=all&arch=any&searchon=sourcenames&keywords=python3.12",
"statuses": [
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "stonking"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "resolute"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "jammy"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "questing"
},
{
"pocket": "security",
"status": "needs-triage",
"component": null,
"description": "",
"release_codename": "upstream"
},
{
"pocket": "security",
"status": "ignored",
"component": null,
"description": "see notes",
"release_codename": "noble"
}
]
}
]Archived source JSONUbuntu Security · ubuntu-package · full conditions
[
{
"name": "python3.10",
"debian": "https://tracker.debian.org/pkg/python3.10",
"source": "https://ubuntu.com/security/cve?package=python3.10",
"ubuntu": "https://packages.ubuntu.com/search?suite=all§ion=all&arch=any&searchon=sourcenames&keywords=python3.10",
"statuses": [
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "stonking"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "resolute"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "noble"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "questing"
},
{
"pocket": "security",
"status": "needs-triage",
"component": null,
"description": "",
"release_codename": "upstream"
},
{
"pocket": "security",
"status": "ignored",
"component": null,
"description": "see notes",
"release_codename": "jammy"
}
]
}
]Archived source JSONUbuntu Security · ubuntu-package · full conditions
[
{
"name": "python3.11",
"debian": "https://tracker.debian.org/pkg/python3.11",
"source": "https://ubuntu.com/security/cve?package=python3.11",
"ubuntu": "https://packages.ubuntu.com/search?suite=all§ion=all&arch=any&searchon=sourcenames&keywords=python3.11",
"statuses": [
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "stonking"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "resolute"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "noble"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "questing"
},
{
"pocket": "security",
"status": "needs-triage",
"component": null,
"description": "",
"release_codename": "upstream"
},
{
"pocket": "security",
"status": "ignored",
"component": null,
"description": "see notes",
"release_codename": "jammy"
}
]
}
]Archived source JSONUbuntu Security · ubuntu-package · full conditions
[
{
"name": "python3.13",
"debian": "https://tracker.debian.org/pkg/python3.13",
"source": "https://ubuntu.com/security/cve?package=python3.13",
"ubuntu": "https://packages.ubuntu.com/search?suite=all§ion=all&arch=any&searchon=sourcenames&keywords=python3.13",
"statuses": [
{
"pocket": "security",
"status": "ignored",
"component": null,
"description": "end of life, was ignored [see notes]",
"release_codename": "questing"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "stonking"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "resolute"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "jammy"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "noble"
},
{
"pocket": "security",
"status": "needs-triage",
"component": null,
"description": "",
"release_codename": "upstream"
}
]
}
]Archived source JSONCVE Program · cve-json · full conditions
{
"affected": [
{
"repo": "https://github.com/python/cpython",
"vendor": "Python Software Foundation",
"modules": [
"base64"
],
"product": "CPython",
"versions": [
{
"status": "affected",
"version": "0",
"lessThan": "3.13.10",
"versionType": "python"
},
{
"status": "affected",
"version": "3.14.0",
"lessThan": "3.14.1",
"versionType": "python"
},
{
"status": "affected",
"version": "3.15.0a1",
"lessThan": "3.15.0a2",
"versionType": "python"
}
],
"defaultStatus": "unaffected"
}
],
"additionalContainers": [
{
"title": "CISA ADP Vulnrichment",
"metrics": [
{
"other": {
"type": "ssvc",
"content": {
"id": "CVE-2025-12781",
"role": "CISA Coordinator",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2026-01-22T14:53:47.177224Z"
}
}
}
],
"problemTypes": [
{
"descriptions": [
{
"lang": "en",
"type": "CWE",
"cweId": "CWE-704",
"description": "CWE-704 Incorrect Type Conversion or Cast"
}
]
}
],
"providerMetadata": {
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP",
"dateUpdated": "2026-01-22T14:53:50.663Z"
}
}
]
}Archived source JSONCorrection evidence
Distribution packages and upstream releases are distinct. ESM channels may require the corresponding Ubuntu entitlement. Notes and branch ranges are not installable package versions. OSV fixed boundaries are ecosystem-specific version thresholds, not proof that a package is currently available or installed.
No correction has been verified in the connected records. This does not mean the system is secure or that no vendor correction exists.
Vendor notices and operational guidance
No connected vendor notice is available for this record.
Original sources and dates
- Ubuntu SecurityConsulted: 2026-11-19T16:49:50.556ZArchived source JSON
Source publication: 2026-01-21T20:16:00.000Z
Source modification: 2026-06-19T15:59:39.279ZDocument fingerprint
a9044e9218a1f55007e114042caced6241eae91e119becfa310727a96eddb7b5 - CVE ProgramConsulted: 2026-11-19T12:57:24.638ZArchived source JSON
Source publication: 2026-01-21T19:34:47.979Z
Source modification: 2026-01-22T20:12:56.421ZDocument fingerprint
50c15e6e218aba4ea99940659a420528cb602a398e782db0920c4720b73ce4c5 - Ubuntu SecurityConsulted: 2026-11-19T16:56:21.568ZArchived source JSON
Source publication: 2026-01-21T20:16:00.000Z
Source modification: 2026-06-19T15:59:39.279ZDocument fingerprint
787ad98a751d9397055fd9aba44f85639d82b94b21f8649246c4389d48b8c8a2 - Ubuntu SecurityConsulted: 2026-11-19T16:56:56.288ZArchived source JSON
Source publication: 2026-01-21T20:16:00.000Z
Source modification: 2026-06-19T15:59:39.279ZDocument fingerprint
0f3b32f8761b28ed67ab91d723b1baea9873c8569dffdf0d9cf777f1bd4535f6 - Ubuntu SecurityConsulted: 2026-11-19T16:56:19.141ZArchived source JSON
Source publication: 2026-01-21T20:16:00.000Z
Source modification: 2026-06-19T15:59:39.279ZDocument fingerprint
bb7302723c34457a69fdc2a92382e7d47a80414860f536b96370ad574d88c3c1 - CISA KEVConsulted: 2026-11-19T16:57:41.748ZArchived source JSON
Source publication: not supplied
Source modification: 2026-11-18T19:17:41.0354ZDocument fingerprint
a35fdc67c7d9802988dcfc1d3ff1198da327948d1db122ab7692ac201055ac56 - FIRST EPSSConsulted: 2026-11-19T16:04:40.125ZArchived source JSON
Source publication: not supplied
Source modification: not suppliedDocument fingerprint
7110337ea01b81d7d0eef5fde179582e77e740d9cbc9bc26ad284dce47f01898
Official status history
- UNKNOWN → PUBLISHED · · evidence