Skip to main content

Improper Neutralization of Special Elements used in a Command ('Command Injection')


Severity High
Score 7.6/10


In Python (aka CPython) versions through 3.7.15, 3.8.0 through 3.8.15, 3.9.0 through 3.9.15, 3.10.0 through 3.10.7 and 3.11.0a1 through v3.11.0b4, the mailcap module does not add escape characters into commands discovered in the system mailcap file. This may allow attackers to inject shell commands into applications that call "mailcap.findmatch" with untrusted input (if they lack validation of user-provided filenames or arguments).

  • LOW
  • HIGH
  • NONE
  • LOW
  • LOW
  • LOW

CWE-77 - Command Injection

A command injection attack involves injecting an operating system command through the data input, which gets executed on the host operating system with the privileges of the victimized application. The impact of a command injection attack may range from loss of data confidentiality and integrity to unauthorized remote access to the hosting system. The attack may cause serious data breaches and system takeover.

Advisory Timeline

  • Published