CVE-2023-26052
Unhandled Python Exceptions in Saleor GraphQL API
- CVSS 5.3
- CWE-209 Generation of Error Message Containing Sensitive Information
- Information Leakage
- Remote
Saleor is a headless, GraphQL commerce platform delivering personalized shopping experiences. Some internal Python exceptions are not handled properly and thus are returned in API as error messages. Some messages might contain sensitive information like infrastructure details in unauthenticated requests. This issue has been patched in versions 3.1.48, 3.7.59, 3.8.0, 3.9.27, 3.10.14 and 3.11.12.
- CVSS base score
- 5.3
- Published
- 2023-03-02
- OWASP
- A05 Security Misconfiguration
- Orthogonal defect classification
- Function
- Code defect classification
- Incorrect Functionality
- Category
- Information Leakage
- Subcategory
- Information Disclosure
- Accessibility scope
- Remote
- Impact
- Information Disclosure
- Fixed by upgrading
- Yes
Solution
Update Saleor to version 3.1.48, 3.7.59, 3.8.0, 3.9.27, 3.10.14, or 3.11.12 to fix the vulnerability.
Vulnerable code sample
def some_graphql_resolver():
try:
raise ValueError("This is a sensitive error message that should not be exposed.")
except Exception as e:
return {
"errors": [
{
"message": str(e)
}
]
}Patched code sample
import logging
logging.basicConfig(level=logging.ERROR)
def handle_graphql_error(error):
logging.error(f"GraphQL error occurred: {error}")
return {
"errors": [
{
"message": "An internal error occurred. Please try again later."
}
]
}
def some_graphql_resolver():
try:
raise ValueError("This is a sensitive error message that should not be exposed.")
except Exception as e:
return handle_graphql_error(e)Cite this entry
@misc{vaitp:cve202326052,
title = {{Unhandled Python Exceptions in Saleor GraphQL API}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2023},
note = {VAITP Python Vulnerability Dataset, entry CVE-2023-26052},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2023-26052/}}
}
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 ::
