CVE-2023-6572
Sensitive information exposure in gradio-app/gradio GitHub repository prior to main branch
- CVSS 8.1
- CWE-77 Improper Neutralization of Special Elements used in a Command ('Command Injection')
- Information Leakage
- Remote
Exposure of Sensitive Information to an Unauthorized Actor in GitHub repository gradio-app/gradio prior to main.
- CVSS base score
- 8.1
- Published
- 2023-12-14
- OWASP
- A07 Identification and Authentication Failures
- Orthogonal defect classification
- Function
- Code defect classification
- Extraneous Functionality
- Category
- Information Leakage
- Subcategory
- Insecure Handling of Sensitive Data
- Accessibility scope
- Remote
- Impact
- Information Disclosure
- Fixed by upgrading
- Yes
Solution
Update Gradio to version 2023-11-06 or later
Vulnerable code sample
from flask import Flask, jsonify
app = Flask(__name__)
@app.route('/sensitive-data', methods=['GET'])
def get_sensitive_data():
sensitive_data = {"secret": "This is sensitive information"}
return jsonify(sensitive_data)
if __name__ == '__main__':
app.run()Patched code sample
import os
from flask import Flask, request, jsonify
app = Flask(__name__)
ACCESS_TOKEN = os.getenv("ACCESS_TOKEN")
@app.route('/sensitive-data', methods=['GET'])
def get_sensitive_data():
token = request.headers.get('Authorization')
if token != f"Bearer {ACCESS_TOKEN}":
return jsonify({"error": "Unauthorized access"}), 403
sensitive_data = {"secret": "This is sensitive information"}
return jsonify(sensitive_data)
if __name__ == '__main__':
app.run()Cite this entry
@misc{vaitp:cve20236572,
title = {{Sensitive information exposure in gradio-app/gradio GitHub repository prior to main branch}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2023},
note = {VAITP Python Vulnerability Dataset, entry CVE-2023-6572},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2023-6572/}}
}
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 ::
