Vulnerabilities in pkg:pypi/mesop
PACKAGECVE-2026-93421 is a MODERATE unauthenticated ansi escape sequence injection vulnerability (CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences) affecting Mesop libraries in the PyPI ecosystem. The issue involves unauthenticated ansi escape sequence injection in csp reporting endpoint. Remediation is available by upgrading affected packages to version 1.3.4.
pkg:pypi/mesop
Vulnerability advisories affecting package pkg:pypi/mesop. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-g7f6-rxc4-qhph | CVE-2026-93421 | MODERATE | Mesop: Unauthenticated ANSI Escape Sequence Injection in CSP Reporting Endpoint |
| GHSA-3jr7-6hqp-x679 | CVE-2026-34824 | HIGH | Mesop: Unbounded Thread Creation in WebSocket Handler Leads to Denial of Service |
| GHSA-gjgx-rvqr-6w6v | CVE-2026-33057 | CRITICAL | Mesop Affected by Unauthenticated Remote Code Execution via Test Suite Route /exec-py |
| GHSA-8qvf-mr4w-9x2c | CVE-2026-33054 | CRITICAL | Mesop has a Path Traversal utilizing `FileStateSessionBackend` leads to Application Denial of Service and File Write/Deletion |
| GHSA-f3mf-hm6v-jfhh | CVE-2025-30358 | HIGH | Mesop Class Pollution vulnerability leads to DoS and Jailbreak attacks |
| GHSA-pmv9-3xqp-8w42 | CVE-2024-45601 | HIGH | Mesop has a local file Inclusion via static file serving functionality |
CVE-2026-93421 at a Glance
How to Fix CVE-2026-93421
To remediate this vulnerability, upgrade all affected Mesop dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install mesop>=1.3.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show mesop
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-93421, inspect your installed packages using pip:
pip show mesop
Analyze the terminal output to locate any version of Mesop in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.4), your application is affected.
Note: The pip show mesop command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences, where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as escape, meta, or control character sequences when they are sent to a downstream component. In Mesop, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-93421 Affected Mesop Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mesop
|
PyPI |
< 1.3.4
|
1.3.4
|
References
Frequently Asked Questions
What is CVE-2026-93421?
Which Mesop versions are affected?
What version fixes CVE-2026-93421?
Is mesop affected?
What CWE is associated with CVE-2026-93421?
How can I check PyPI dependencies for CVE-2026-93421?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g7f6-rxc4-qhph",
"modified" : "2026-09-23T19:01:05Z",
"published" : "2026-09-23T19:01:05Z",
"aliases" : [ "CVE-2026-93421" ],
"summary" : "Mesop: Unauthenticated ANSI Escape Sequence Injection in CSP Reporting Endpoint",
"details" : "### Summary\n\nThe `/__csp__` endpoint accepts unauthenticated JSON reports and logs user-controlled values directly to stdout using `print()` without escaping control characters.\n\nA remote attacker can include ANSI/VT100 escape sequences in fields such as `blocked-uri` or `document-uri`. When the logs are viewed in an ANSI-capable terminal, these sequences can manipulate the displayed output (e.g., clear the screen, hide text, or inject misleading messages), affecting the integrity of operator-facing logs.\n\n### Details\n\nThe CSP reporting endpoint accepts arbitrary JSON and prints several request fields directly:\n\nmesop/server/static_file_serving.py\n```python\n@app.route(prefix_base_url(\"/__csp__\"), methods=[\"POST\"])\ndef csp_report():\n report = request.get_json(force=True)\n\n document_uri = report[\"csp-report\"][\"document-uri\"]\n blocked_uri = report[\"csp-report\"][\"blocked-uri\"]\n violated_directive = report[\"csp-report\"][\"violated-directive\"]\n\n print(f\"... Blocked URL: {blocked_uri} ...\")\n```\n\nSince these values are written to stdout without sanitization, ANSI escape sequences supplied by a remote client are preserved and interpreted by ANSI-compatible terminals.\n\n### PoC\n\nSend the following request:\n\n```http\nPOST /__csp__\nContent-Type: application/json\n\n{\n \"csp-report\": {\n \"document-uri\": \"https://victim.example\",\n \"blocked-uri\": \"\\u001b[2J\\u001b[H\\u001b[32m*** SECURITY OK - No CSP violations found ***\\u001b[0m\\n\\u001b[8mhttps://evil.example\",\n \"violated-directive\": \"script-src-elem\"\n }\n}\n```\n\nThe request is accepted (HTTP 204), and the injected escape sequences are written to stdout unchanged.\n\nWhen the captured output is rendered in a VT100-compatible terminal (verified using `pyte`), the original CSP warning is visually replaced with attacker-controlled content.\n\n**Expected output**\n\n```text\n Content Security Policy Error\n\nDirective: script-src-elem\nBlocked URL: ...\nApp path: /app\n```\n\n**Rendered output**\n\n```text\n*** SECURITY OK - No CSP violations found ***\nhttps://evil.example\nApp path: /app\n```\n\n### Impact\n\nAn unauthenticated remote attacker can submit a crafted request to the /__csp__ endpoint containing ANSI/VT100 escape sequences. Because these values are written directly to stdout without sanitization, an attacker can:\n\n1. Inject forged log messages that appear to originate from the application.\n2. Manipulate the terminal display by clearing the screen, moving the cursor, or overwriting previously displayed log output.\n3. Hide or disguise security-relevant log entries using terminal formatting sequences such as colors, hidden text, or cursor positioning.\n4. Mislead administrators during monitoring or incident response by displaying attacker-controlled messages (e.g., fake \"SECURITY OK\" notifications).\n5. Reduce the integrity and trustworthiness of operator-facing logs, making troubleshooting and security investigations less reliable.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "mesop"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.3.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.3.3"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mesop-dev/mesop/security/advisories/GHSA-g7f6-rxc4-qhph"
}, {
"type" : "WEB",
"url" : "https://github.com/mesop-dev/mesop/pull/1397"
}, {
"type" : "WEB",
"url" : "https://github.com/mesop-dev/mesop/commit/f38c42a1d3eba246941ef8d7f645072d53c58785"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mesop-dev/mesop"
}, {
"type" : "WEB",
"url" : "https://github.com/mesop-dev/mesop/releases/tag/v1.3.4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-117", "CWE-150" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-23T19:01:05Z",
"nvd_published_at" : null
}
}