Skip to main content
EPSS 0.4%top 68%

CVE-2025-15366: CWE-77 Improper Neutralization of Special Elements used in a Command ('Command Injection') in Python Software Foundation CPython

0
Medium
VulnerabilityCVE-2025-15366cvecve-2025-15366cwe-77
Published: 01/20/2026 (01/20/2026, 21:40:24 UTC)
Source: CVE Database V5
Vendor/Project: Python Software Foundation
Product: CPython

Description

The imaplib module, when passed a user-controlled command, can have additional commands injected using newlines. Mitigation rejects commands containing control characters.

CVSS v4.0

Score 5.9medium

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
High
User Interaction
None
Vuln. Confidentiality
Low
Vuln. Integrity
High
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

Affected versions
=0=3.15.0=3.14.03.14.03.15.0a1

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/06/2026, 13:11:15 UTC

Technical Analysis

The imaplib module in CPython allows command injection when it processes user-supplied commands containing newline characters, enabling attackers to inject additional commands. This is due to improper neutralization of special elements (CWE-77). The vulnerability is mitigated by rejecting commands that contain control characters. The affected versions include 0, 3.15.0a1, and 3.14.0. The CVSS 4.0 base score is 5.9, indicating a medium severity vulnerability with network attack vector, low complexity, partial privileges required, no user interaction, and limited confidentiality and high integrity and availability impacts.

Potential Impact

An attacker with partial privileges can inject additional commands into the imaplib module by exploiting newline characters in user-controlled input. This could lead to unauthorized command execution within the context of the affected Python process, potentially impacting integrity and availability. Confidentiality impact is low, and no privilege escalation or user interaction is required.

Mitigation Recommendations

No official patch or fix is currently referenced. Patch status is not yet confirmed — check the Python Software Foundation advisory for current remediation guidance. The known mitigation is to reject commands containing control characters to prevent injection. Users should monitor vendor advisories for updates and apply any forthcoming official fixes.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
PSF
Date Reserved
2025-12-30T16:06:41.731Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 696ff8c24623b1157c513cf6

Added to database: 01/20/2026, 21:50:58 UTC

Last enriched: 08/06/2026, 13:11:15 UTC

Last updated: 09/10/2026, 19:36:49 UTC

Views: 504

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses