Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend HTTP request with percent-encoded traversal (..%2f)
-
DeliveryLibrary validates path before decoding, traversal survives
-
ExploitURI percent-decoded after sanitization
-
Executionresolve_local_file maps traversal outside docroot
-
ImpactArbitrary file returned in HTTP response
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Leading special element handling
|
| Exploitation Conditions | Exploitation requires that the target server is built with the cohttp OCaml library (any version before 6.3.0) and uses |
| Impact | The CVSS 4.0 score of 8.7 with vector AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N reflects a high-confidence assessment: network-reachable, no authentication, no user interaction, and high confidentiality impact. These signals are consistent with the technical description - any HTTP server using |
| Exploit ScenarioDerived | An unauthenticated attacker sends an HTTP GET request to a cohttp-based static file server with a URI containing percent-encoded traversal sequences, for example |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 29, 2026
Directory traversal in the cohttp OCaml HTTP library before version 6.3.0 allows unauthenticated remote attackers to read arbitrary files outside the configured document root by supplying percent-encoded path traversal sequences such as ..%2f..%2f in HTTP request URIs. The root cause (CWE-180) is that Cohttp.Path.resolve_local_file validated and stripped . and .. segments before percent-decoding the URI, meaning encoded traversal bypassed sanitization entirely. No public exploit code or CISA KEV listing has been identified at time of analysis, but the network-accessible, zero-authentication attack surface makes this a straightforward read primitive for any server using cohttp's static file resolution.
RemediationAI
Upgrade cohttp to version 6.3.0 or later via opam (opam update && opam upgrade cohttp cohttp-mirage); v6.3.0 was released 2026-08-19 and is confirmed in the upstream CHANGES.md (https://github.com/mirage/ocaml-cohttp/pull/1145). If an immediate upgrade is not possible, servers that perform access-control decisions on path segments must apply the new Cohttp.Path.normalise function to Request.uri before any path inspection - the PR includes a worked example. As a compensating control, operators can place a reverse proxy (nginx, HAProxy) in front of the cohttp application and configure it to normalize or reject requests containing percent-encoded slash or dot sequences (%2f, %2e, %2F, %2E); note that some proxy defaults pass these through unchanged, so explicit deny rules are required. Restricting the cohttp server to non-public network segments limits exposure but does not eliminate the vulnerability for internal threat models.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
cohttp (CPE: cpe:2.3:a:mirage:cohttp:*:*:*:*:*:*:*:*) is the primary HTTP/1.x client-server library for OCaml, widely used in the MirageOS unikernel ecosystem and standard OCaml web applications. The vulnerability maps to CWE-180 (Incorrect Behavior Order: Validate Before Canonicalize): the library's Cohttp.Path.resolve_local_file function removed . and .. path segments prior to percent-decoding the URI, so a segment encoded as ..%2f survived the sanitization pass and was then decoded into a functional directory traversal component. The fix in v6.3.0 (PR #1145) reverses this order - the URI is percent-decoded exactly once before segment normalization - and introduces a new Cohttp.Path.normalise function that produces a root-confined relative path for use in access-control decisions. The cohttp-mirage static file server component was also corrected to normalize request paths before looking them up in the mirage-kv key-value store.
Know when Cohttp 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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/AU:Y/R:A/V:D/RE:M
Network vector, no auth, no interaction; pure read-only traversal gives high confidentiality but no integrity or availability impact.
Primary rating from Vendor (mitre).
CVSS VectorVendor: mitre
Lifecycle Timeline
2DescriptionCVE.org
The cohttp package before 6.3.0 for OCaml allows directory traversal.
Executive ViewAI
The cohttp OCaml HTTP library contains a directory traversal vulnerability (CVSS 8.7) enabling unauthenticated remote attackers to read arbitrary files outside the configured document root via percent-encoded path sequences. Organizations operating cohttp-based web services face potential exposure of sensitive configuration files, credentials, and application source code to any attacker with network access. Immediate assessment and mitigation of affected systems is required.
No vendor-released patch identified at time of analysis. Implement these interim protections: (1) Restrict cohttp services to serve only from a minimal, hardened document root containing no sensitive files; (2) Add strict input validation that performs full percent-decoding and path canonicalization before any permission checks or file operations; (3) Deploy Web Application Firewall rules to block requests containing encoded path traversal sequences such as %2e%2e and %2f; (4) Run cohttp processes in containerized environments with minimal mounted file systems and read-only access where operationally feasible; (5) Enable comprehensive access logging on all file I/O operations with real-time alerting for suspicious path traversal patterns; (6) Deploy a hardened reverse proxy (nginx, Apache) with strict allowlist-based file serving policies in front of cohttp services.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
EUVD-2026-68116
GHSA-qcjm-vmrx-v935
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB