VAITP Dataset

← Back to the dataset

CVE-2024-28114

Server Side Template Injection in Peering Manager <=1.8.2 allows RCE.

  • CVSS 9.1
  • CWE-74
  • Input Validation and Sanitization
  • Remote

Peering Manager is a BGP session management tool. There is a Server Side Template Injection vulnerability that leads to Remote Code Execution in Peering Manager <=1.8.2. As a result arbitrary commands can be executed on the operating system that is running Peering Manager. This issue has been addressed in version 1.8.3. Users are advised to upgrade. There are no known workarounds for this vulnerability.

CVSS base score
9.1
Published
2024-03-12
OWASP
A03 Injection
Orthogonal defect classification
Function
Code defect classification
Incorrect Functionality
Category
Input Validation and Sanitization
Subcategory
Command Injection
Accessibility scope
Remote
Impact
Arbitrary Code Execution
Affected component
Peering Mana

Solution

Upgrade to Peering Manager version 1.8.3 or later.

Vulnerable code sample

from jinja2 import Environment, FileSystemLoader

env = Environment(
    loader=FileSystemLoader('templates')
)

template = env.get_template('example_template.html')
output = template.render(user_input=user_input)

Patched code sample

from jinja2 import Environment, FileSystemLoader, select_autoescape

env = Environment(
    loader=FileSystemLoader('templates'),
    autoescape=select_autoescape(['html', 'xml'])
)

template = env.get_template('example_template.html')
output = template.render(user_input=user_input)

Payload

{{ config.__class__.__init__.__globals__['os'].popen('whoami').read() }}

Cite this entry

@misc{vaitp:cve202428114,
  title        = {{Server Side Template Injection in Peering Manager <=1.8.2 allows RCE.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2024},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2024-28114},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2024-28114/}}
}
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 ::