{"answers":{"affected":"3 open source packages ship an affected version, including libpython, python and python-min.","exploited":"There is no known exploitation of CVE-2025-15366 in the wild and no public exploit code.","fix":"Upgrade libpython to 3.15.0 or later.","what":"CVE-2025-15366 is a medium-severity command injection vulnerability in CPython, published on 20 Jan 2026. An attacker needs administrator access to exploit it, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-15366 and fix it if it is affected.\n\nWhat it is: CVE-2025-15366 is a medium-severity command injection vulnerability in CPython, published on 20 Jan 2026. An attacker needs administrator access to exploit it, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2025-15366 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- libpython (Bitnami): affected all versions; fixed in 3.15.0\n- python (Bitnami): affected all versions; fixed in 3.15.0\n- python-min (Bitnami): affected all versions; fixed in 3.15.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-15366/ (Markdown: https://insights.sbomify.com/CVE-2025-15366/index.md)","id":"CVE-2025-15366","markdown":"https://insights.sbomify.com/CVE-2025-15366/index.md","name":"CVE-2025-15366","record":{"aliases":["ALPINE-CVE-2025-15366","AZL-75029","AZL-75041","AZL-84284","BELL-CVE-2025-15366","BIT-libpython-2025-15366","BIT-python-2025-15366","BIT-python-min-2025-15366","CLSA-2026-1771432562","CLSA-2026-1771597308","CLSA-2026-1774518355","CLSA-2026-1774613805","CLSA-2026-1774614065","CLSA-2026-1774614606","CLSA-2026-1775057964","CLSA-2026-1775058202","CLSA-2026-1775058454","CLSA-2026-1776091275","DEBIAN-CVE-2025-15366","ECHO-a3ad-1e4f-ac31","GHSA-4c67-8q63-xrxq","MINI-78jm-p4q5-m944","MINI-8f7w-hhhw-3m52","MINI-mcq6-rvw4-j52p","MINI-p9q2-v4p8-xpq9","MINI-q8hv-48hc-pfgj","PSF-2026-3","RHSA-2026:5979","ROOT-OS-DEBIAN-12-CVE-2025-15366","ROOT-OS-DEBIAN-13-CVE-2025-15366","UBUNTU-CVE-2025-15366"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Python standard library","requires_auth":"high_privilege","summary":"Attackers can inject IMAP commands via newlines in user-controlled input, potentially leading to code execution in applications using Python's imaplib.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"PSF","cpe":[],"cvss":{"score":5.9,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"}],"description":"The imaplib module, when passed a user-controlled command, can have additional commands injected using newlines. Mitigation rejects commands containing control characters.","ecosystems":["Bitnami","Red Hat:hummingbird:1"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"IMAP command injection in user-controlled commands","id":"CVE-2025-15366","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"command_injection","year":"2025"},"n_packages":12,"n_references":8,"next":{"headline":"POP3 command injection in user-controlled commands","id":"CVE-2025-15367"},"packages":[{"ecosystem":"Bitnami","fixed":["3.15.0"],"introduced":["0"],"last_affected":[],"package":"libpython","purl":"pkg:bitnami/libpython","source":"BIT-libpython-2025-15366"},{"ecosystem":"Bitnami","fixed":["3.15.0"],"introduced":["0"],"last_affected":[],"package":"python","purl":"pkg:bitnami/python","source":"BIT-python-2025-15366"},{"ecosystem":"Bitnami","fixed":["3.15.0"],"introduced":["0"],"last_affected":[],"package":"python-min","purl":"pkg:bitnami/python-min","source":"BIT-python-min-2025-15366"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.13.12-2.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.13","purl":"pkg:rpm/redhat/python3.13","source":"RHSA-2026:5979"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.13.12-2.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.13-debug","purl":"pkg:rpm/redhat/python3.13-debug","source":"RHSA-2026:5979"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.13.12-2.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.13-devel","purl":"pkg:rpm/redhat/python3.13-devel","source":"RHSA-2026:5979"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.13.12-2.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.13-freethreading","purl":"pkg:rpm/redhat/python3.13-freethreading","source":"RHSA-2026:5979"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.13.12-2.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.13-freethreading-debug","purl":"pkg:rpm/redhat/python3.13-freethreading-debug","source":"RHSA-2026:5979"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.13.12-2.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.13-idle","purl":"pkg:rpm/redhat/python3.13-idle","source":"RHSA-2026:5979"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.13.12-2.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.13-libs","purl":"pkg:rpm/redhat/python3.13-libs","source":"RHSA-2026:5979"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.13.12-2.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.13-test","purl":"pkg:rpm/redhat/python3.13-test","source":"RHSA-2026:5979"},{"ecosystem":"Red Hat:hummingbird:1","fixed":["0:3.13.12-2.hum1"],"introduced":["0"],"last_affected":[],"package":"python3.13-tkinter","purl":"pkg:rpm/redhat/python3.13-tkinter","source":"RHSA-2026:5979"}],"prev":{"headline":"Download Manager \u003c= 3.3.40 - Unauthenticated Limited Privilege Escalation via updatePassword","id":"CVE-2025-15364"},"products":["CPython"],"published":"2026-01-20","related":[],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-08-06","vendors":["Python Software Foundation"]},"summary":"Attackers can inject IMAP commands via newlines in user-controlled input, potentially leading to code execution in applications using Python's imaplib.","url":"https://insights.sbomify.com/CVE-2025-15366/"}