VAITP Dataset

← Back to the dataset

CVE-2023-0057

Improper UI layer restriction in pyload (before 0.5.0b3.dev33) allows unauthorized access

  • CVSS 6.1
  • CWE-1021 Improper Restriction of Rendered UI Layers or Frames
  • Input Validation and Sanitization
  • Remote

Improper Restriction of Rendered UI Layers or Frames in GitHub repository pyload/pyload prior to 0.5.0b3.dev33.

CVSS base score
6.1
Published
2023-01-05
OWASP
A01 Broken Access Control
Orthogonal defect classification
Checking
Code defect classification
Missing Check
Category
Input Validation and Sanitization
Subcategory
Insecure Direct Object References (IDOR)
Accessibility scope
Remote
Impact
Unauthorized Access
Affected component
Python
Fixed by upgrading
Yes

Solution

Update pyload to version 0.5.0b3.dev33 or higher.

Vulnerable code sample

from flask import Flask, render_template

app = Flask(__name__)

@app.route('/page')
def page():
    # Vulnerable to improper restriction of rendered UI layers or frames
    return render_template('page.html')

if __name__ == '__main__':
    app.run()

Patched code sample

from flask import Flask, render_template

app = Flask(__name__)

@app.route('/secure_page')
def secure_page():
    # Properly restrict access to rendered UI layers or frames
    return render_template('secure_page.html')

if __name__ == '__main__':
    app.run()

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.

Cite this entry

@misc{vaitp:cve20230057,
  title        = {{Improper UI layer restriction in pyload (before 0.5.0b3.dev33) allows unauthorized access}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2023},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2023-0057},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2023-0057/}}
}

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.