VAITP Dataset

← Back to the dataset

CVE-2022-27177

Python format string vulnerability in ConsoleMe (< 1.2.2) allows info disclosure and potential remote code execution

  • CVSS 9.8
  • CWE-134 Use of Externally-Controlled Format String
  • Input Validation and Sanitization
  • Remote

A Python format string issue leading to information disclosure and potentially remote code execution in ConsoleMe for all versions prior to 1.2.2

CVSS base score
9.8
Published
2022-04-01
OWASP
A03 Injection
Orthogonal defect classification
Function
Code defect classification
Incorrect Functionality
Category
Input Validation and Sanitization
Subcategory
Insecure Parsing or Deserialization
Accessibility scope
Remote
Impact
Information Disclosure
Affected component
ConsoleMe
Fixed by upgrading
Yes

Solution

Update ConsoleMe to version 1.2.2 or higher.

Vulnerable code sample

import logging

# Vulnerable logging statement that could lead to format string attack
user_input = "User   input that could be malicious"
logging.info("User   input: %s" % user_input)  # Vulnerable to format string attack

Patched code sample

import logging

# Example of a vulnerable logging statement
# user_input = "User  input that could be malicious"
# logging.info("User  input: %s" % user_input)  # Vulnerable to format string attack

# Fixed logging statement
user_input = "User  input that could be malicious"
logging.info("User  input: %s", user_input)  # Safe from format string attack

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

  • Security fix (#9306) (Netflix/consoleme)
    consoleme/lib/defaults.py, consoleme/lib/generic.py · iterate_and_format_dict

Cite this entry

@misc{vaitp:cve202227177,
  title        = {{Python format string vulnerability in ConsoleMe (< 1.2.2) allows info disclosure and potential remote code execution}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2022},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2022-27177},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2022-27177/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.