VAITP Dataset

← Back to the dataset

CVE-2024-32979

Nautobot vulnerable to Reflected XSS via improperly handled query parameters.

  • CVSS 6.1
  • CWE-79
  • Input Validation and Sanitization
  • Remote

Nautobot is a Network Source of Truth and Network Automation Platform built as a web application atop the Django Python framework with a PostgreSQL or MySQL database. It was discovered that due to improper handling and escaping of user-provided query parameters, a maliciously crafted Nautobot URL could potentially be used to execute a Reflected Cross-Site Scripting (Reflected XSS) attack against users. All filterable object-list views in Nautobot are vulnerable. This issue has been fixed in Nautobot versions 1.6.20 and 2.2.3. There are no known workarounds for this vulnerability.

CVSS base score
6.1
Published
2024-05-01
OWASP
A03 Injection
Orthogonal defect classification
Checking
Code defect classification
Incorrect Check
Category
Input Validation and Sanitization
Subcategory
Cross-Site Scripting (XSS)
Accessibility scope
Remote
Impact
Information Disclosure
Affected component
Nautobot

Solution

Upgrade Nautobot to version 1.6.20 or 2.2.3.

Vulnerable code sample

def filter_view(request):
    user_input = request.GET.get('filter_param', '')
    response = f"<div>User input: {user_input}</div>"
    return HttpResponse(response)

Patched code sample

from django.utils.html import escape

def filter_view(request):
    user_input = request.GET.get('filter_param', '')
    sanitized_input = escape(user_input)
    response = f"<div>User input: {sanitized_input}</div>"
    return HttpResponse(response)

Payload

<script>alert('XSS Vulnerability Exploited');</script>

Cite this entry

@misc{vaitp:cve202432979,
  title        = {{Nautobot vulnerable to Reflected XSS via improperly handled query parameters.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2024},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2024-32979},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2024-32979/}}
}
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 ::