Path traversal in Cohttp.Path.resolve_local_file
A path traversal vulnerability exists in the Cohttp library's Path.resolve_local_file function due to improper normalization of URI paths before percent decoding. This allows encoded path separators (%2f) to bypass dot-segment normalization, enabling crafted requests to access files outside the intended document root. The issue was reported in August 2026 and fixed in version 6.3.0.
AI Analysis
Technical Summary
The vulnerability arises because the function resolves and normalizes the URI path before decoding percent-encoded characters. Encoded separators such as %2f remain encoded during normalization, allowing them to survive dot-segment removal. After normalization, the path is percent-decoded, which can transform a normalized path into one containing directory traversal sequences (e.g., /static/..%2f..%2f..%2fetc/passwd becomes /static/../../../etc/passwd). This flaw enables attackers to access arbitrary files on the server by bypassing path normalization controls. The issue was reported on August 11, 2026, and fixed in Cohttp version 6.3.0.
Potential Impact
An attacker can exploit this vulnerability to perform path traversal attacks, potentially accessing sensitive files outside the intended document root. This can lead to unauthorized disclosure of sensitive information. The vulnerability does not require authentication and can be exploited remotely without user interaction.
Mitigation Recommendations
A fix is available in Cohttp version 6.3.0. Users should upgrade to version 6.3.0 or later to remediate this vulnerability. No additional mitigation steps are indicated by the vendor advisory.
Path traversal in Cohttp.Path.resolve_local_file
Description
A path traversal vulnerability exists in the Cohttp library's Path.resolve_local_file function due to improper normalization of URI paths before percent decoding. This allows encoded path separators (%2f) to bypass dot-segment normalization, enabling crafted requests to access files outside the intended document root. The issue was reported in August 2026 and fixed in version 6.3.0.
CVSS v4.0
Affected software
pkg:opam/cohttpRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises because the function resolves and normalizes the URI path before decoding percent-encoded characters. Encoded separators such as %2f remain encoded during normalization, allowing them to survive dot-segment removal. After normalization, the path is percent-decoded, which can transform a normalized path into one containing directory traversal sequences (e.g., /static/..%2f..%2f..%2fetc/passwd becomes /static/../../../etc/passwd). This flaw enables attackers to access arbitrary files on the server by bypassing path normalization controls. The issue was reported on August 11, 2026, and fixed in Cohttp version 6.3.0.
Potential Impact
An attacker can exploit this vulnerability to perform path traversal attacks, potentially accessing sensitive files outside the intended document root. This can lead to unauthorized disclosure of sensitive information. The vulnerability does not require authentication and can be exploited remotely without user interaction.
Mitigation Recommendations
A fix is available in Cohttp version 6.3.0. Users should upgrade to version 6.3.0 or later to remediate this vulnerability. No additional mitigation steps are indicated by the vendor advisory.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- OSEC-2026-16
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["opam"]
- Database Specific Severity
- null
- Cvss Version
- 4.0
Threat ID: 6a89a6c8acd9273b49150b05
Added to database: 08/22/2026, 13:40:24 UTC
Last enriched: 08/22/2026, 13:41:32 UTC
Last updated: 08/22/2026, 15:42:20 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.