VAITP Dataset

← Back to the dataset

CVE-2020-7734

Cabot package: XSS via Endpoint column in all versions

  • CVSS 8.2
  • CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
  • Configuration Issues
  • Remote

All versions of package cabot are vulnerable to Cross-site Scripting (XSS) via the Endpoint column.

CVSS base score
8.2
Published
2020-09-22
OWASP
A03 Injection
Orthogonal defect classification
Function
Code defect classification
Incorrect Functionality
Category
Configuration Issues
Subcategory
Cross-Site Scripting (XSS)
Accessibility scope
Remote
Impact
Arbitrary Code Execution
Affected component
cabot
Fixed by upgrading
Yes

Solution

Update cabot package to a non-vulnerable version.

Vulnerable code sample

@app.route('/your_endpoint')
def your_view_function():
    # Assume `data` is fetched from a database and contains user input
    data = get_data_from_database()

    # Directly rendering user input without escaping, leading to XSS vulnerability
    return render_template('your_template.html', endpoint=data['endpoint'])

Patched code sample

from flask import escape, render_template

@app.route('/your_endpoint')
def your_view_function():
    # Assume `data` is fetched from a database and contains user input
    data = get_data_from_database()

    # Properly escape the user input to prevent XSS
    safe_data = escape(data['endpoint'])

    return render_template('your_template.html', endpoint=safe_data)

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.

  • Fix XSS (arachnys/cabot)
    cabot/cabotapp/models/base.py

Cite this entry

@misc{vaitp:cve20207734,
  title        = {{Cabot package: XSS via Endpoint column in all versions}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2020},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2020-7734},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2020-7734/}}
}

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.