Skip to main content

Mesop CVE-2026-93421

| EUVDEUVD-2026-85568 MEDIUM
Improper Output Neutralization for Logs (CWE-117)
2026-09-23 https://github.com/mesop-dev/mesop GHSA-g7f6-rxc4-qhph
5.3
CVSS 4.0 · Vendor: https://github.com/mesop-dev/mesop
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Locate exposed Mesop /__csp__ endpoint
  2. Delivery
    POST JSON with ANSI escapes in blocked-uri
  3. Exploit
    Server prints sequences to stdout unescaped
  4. Execution
    Operator views logs in VT100 terminal
  5. Impact
    Forged/hidden log entries mislead responder

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A09:2025 - Security Logging & Alerting Failures
ASVS 5.0
V16 - Security Logging and Error Handling Log output neutralization
Exploitation Conditions

Requires the target to run Mesop <=1.3.3 with the /__csp__ CSP-reporting endpoint reachable by the attacker (it accepts unauthenticated JSON POSTs by default). No authentication or special server configuration is needed to inject the payload. However, actual impact is contingent on a human operator subsequently viewing the raw application stdout in an ANSI/VT100-interpreting terminal (per UI:P); logs consumed by JSON/structured aggregators, SIEMs, or non-rendering pipelines strip or escape the sequences and defeat the attack. There is no confidentiality, availability, or server-side integrity impact - the effect is limited to visual manipulation of operator-facing log output.

Impact

This is a low-to-moderate risk log-integrity issue, not a code-execution or data-disclosure flaw. The vendor CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N, score 5.3) is internally consistent: unauthenticated network delivery, low complexity, but the ONLY impact is Subsequent System Integrity=Low (the operator's terminal display), with zero confidentiality, availability, or vulnerable-system impact. The 5.3 'medium' rating is driven almost entirely by the free unauthenticated reachability, not by consequence severity - the real-world harm ceiling is 'a misled human reading logs.' A public PoC exists in the GitHub advisory (pyte-verified), so exploitation is trivial to reproduce, but there is no EPSS score, no CISA KEV listing, and no evidence of active exploitation; this profile fits an easily-demonstrated but low-payoff issue rather than a mass-exploited one. Exploitation is fully gated on a human operator actually viewing raw stdout in an ANSI/VT100-capable terminal (UI:P) - logs shipped to a JSON aggregator, SIEM, or non-interpreting sink neutralize the attack entirely, which sharply limits practical impact. The provided tag 'Code Injection' overstates the flaw: CWE-117 (improper output neutralization for logs) involves no code execution on the server. Prioritize as low unless operators routinely tail live server stdout during incident response.

Exploit ScenarioDerived

An unauthenticated attacker sends a single crafted POST to the internet-exposed /__csp__ endpoint with ANSI/VT100 escape sequences embedded in the blocked-uri field (e.g. clear-screen plus a green '* SECURITY OK *' banner). The request returns HTTP 204 and the escape codes are written verbatim to stdout; when an operator later tails the logs in a terminal during monitoring or incident response, the forged banner overwrites the genuine CSP-violation warning, hiding real security events. A working PoC is published in the GHSA advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 23, 2026

Unauthenticated ANSI/VT100 escape-sequence injection in the Mesop web framework's /__csp__ CSP-reporting endpoint (pip package mesop <= 1.3.3) allows remote attackers to embed terminal control sequences in JSON report fields such as blocked-uri and document-uri, which are passed straight to print() and written to stdout unsanitized. A public proof-of-concept payload is documented in the vendor advisory; when an operator later views the raw application stdout in an ANSI-capable terminal, the injected sequences can clear the screen, move the cursor, hide text, or render forged messages such as a fake 'SECURITY OK - No CSP violations found' banner, corrupting the integrity of operator-facing logs. The assessed risk is low-to-moderate and is purely a log-integrity issue: there is no confidentiality, availability, or server-side integrity impact, the attack requires a human to view rendered logs (UI:R), and logs consumed by JSON aggregators, SIEMs, or other non-rendering pipelines neutralize the sequences. Vendor-released patch: 1.3.4.

RemediationAI

Upgrade the Mesop pip package to 1.3.4 or later, the vendor-released patch that adds ANSI/VT100 stripping to the CSP handler; the change is implemented in PR #1397 and commit f38c42a1d3eba246941ef8d7f645072d53c58785, and is available from https://github.com/mesop-dev/mesop/releases/tag/v1.3.4, with details in advisory GHSA-g7f6-rxc4-qhph (https://github.com/mesop-dev/mesop/security/advisories/GHSA-g7f6-rxc4-qhph). If upgrading immediately is not possible, the trade-offs must be weighed: piping Mesop's stdout through a sanitizer (for example stripping ESC sequences with a filter before they reach the terminal) neutralizes the payload but requires deployment changes and can drop legitimate application colour/formatting; switching to structured JSON logging or a log shipper/SIEM that escapes control characters defeats the attack entirely but changes log consumption and search tooling; reviewing logs only in non-ANSI renderers (web UIs, pagers with raw mode, editors that display escape bytes) removes the interpretation step but does not stop the malicious bytes from being stored; and blocking or restricting POSTs to /__csp__ at a reverse proxy reduces the attack surface but disables legitimate browser CSP violation reporting unless legitimate reporting hosts are allow-listed. Note the handler also indexes report["csp-report"][...] without validation, so malformed payloads can raise exceptions; input validation and rate limiting on the endpoint are prudent defensive additions regardless of patch status.

Affected VersionsENISA

mesop < 1.3.4

Affected Packages

pypi mesop fix: 1.3.4

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Mesop is a Python UI framework whose server component exposes a Content Security Policy reporting endpoint at /__csp__ (mesop/server/static_file_serving.py). Per the CSP reporting convention, browsers POST JSON documents of the form {"csp-report": {"document-uri": ..., "blocked-uri": ..., "violated-directive": ...}}, and the handler extracts those fields and interpolates them into human-readable log lines via print(). The root cause is CWE-117 (Improper Output Neutralization for Logs): untrusted input is written to a log sink without escaping control characters. Attackers can therefore supply raw ESC bytes (U+001B) carrying CSI sequences (e.g. \x1b[2J to clear the screen, \x1b[H to home the cursor, \x1b[32m colour, \x1b[8m conceal), OSC sequences (e.g. \x1b]0;title\x07 for window-title changes or OSC 8 hyperlinks), and DCS/APC/PM/SOS strings. These bytes survive byte-for-byte through stdout and are only interpreted later by a VT100/ANSI-compatible terminal emulator, which is why the impact is visual/log-integrity rather than execution: the endpoint itself performs no shell interpolation or code evaluation, and there is no server-side memory or state corruption. The affected distribution is tracked as CPE pkg:pip/mesop. The upstream fix adds an _ANSI_ESCAPE_RE regex that strips CSI, OSC, DCS/APC/PM/SOS, and two-byte escape sequences, plus a _sanitize_terminal() helper applied to all three report fields before logging (GitHub PR #1397, commit f38c42a).

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/mesop-dev/mesop) PRIMARY 5.3 MEDIUM
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
vuln.today AI 4.7 MEDIUM

Unauthenticated network POST (PR:N, AV:N, AC:L); impact requires an operator to view logs (UI:R) and lands on the separate terminal component (S:C) with low integrity (I:L) and no C/A.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N

Primary rating from Vendor (https://github.com/mesop-dev/mesop).

CVSS VectorVendor: https://github.com/mesop-dev/mesop

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

1
CVSS changed
Sep 23, 2026 - 19:22 NVD
5.3 (MEDIUM)

DescriptionCVE.org

Summary

The /__csp__ endpoint accepts unauthenticated JSON reports and logs user-controlled values directly to stdout using print() without escaping control characters.

A 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.

Details

The CSP reporting endpoint accepts arbitrary JSON and prints several request fields directly:

mesop/server/static_file_serving.py

python
@app.route(prefix_base_url("/__csp__"), methods=["POST"])
def csp_report():
    report = request.get_json(force=True)

    document_uri = report["csp-report"]["document-uri"]
    blocked_uri = report["csp-report"]["blocked-uri"]
    violated_directive = report["csp-report"]["violated-directive"]

    print(f"... Blocked URL: {blocked_uri} ...")

Since these values are written to stdout without sanitization, ANSI escape sequences supplied by a remote client are preserved and interpreted by ANSI-compatible terminals.

PoC

Send the following request:

http
POST /__csp__
Content-Type: application/json

{
  "csp-report": {
    "document-uri": "https://victim.example",
    "blocked-uri": "\u001b[2J\u001b[H\u001b[32m*** SECURITY OK - No CSP violations found ***\u001b[0m\n\u001b[8mhttps://evil.example",
    "violated-directive": "script-src-elem"
  }
}

The request is accepted (HTTP 204), and the injected escape sequences are written to stdout unchanged.

When the captured output is rendered in a VT100-compatible terminal (verified using pyte), the original CSP warning is visually replaced with attacker-controlled content.

Expected output

text
    Content Security Policy Error

Directive: script-src-elem
Blocked URL: ...
App path: /app

Rendered output

text
*** SECURITY OK - No CSP violations found ***
https://evil.example
App path: /app

Impact

An 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:

  1. Inject forged log messages that appear to originate from the application.
  2. Manipulate the terminal display by clearing the screen, moving the cursor, or overwriting previously displayed log output.
  3. Hide or disguise security-relevant log entries using terminal formatting sequences such as colors, hidden text, or cursor positioning.
  4. Mislead administrators during monitoring or incident response by displaying attacker-controlled messages (e.g., fake "SECURITY OK" notifications).
  5. Reduce the integrity and trustworthiness of operator-facing logs, making troubleshooting and security investigations less reliable.

Threat Intelligence Overview

EPSS Score
0.4%
Top 68% exploitable
Prevalence
Low
niche Google-backed Python UI framework, limited production deployment footprint
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy