Path Traversal Vulnerability in curl via Unsanitized IPFS_PATH Environment Variable
What the report claims
IPFS_PATH environment variable is not properly sanitized, allowing directory traversal to read arbitrary files via curl's IPFS gateway.
Compare with curl's recorded outcome
Labeled AI slop
curl's maintainer lists this report as AI slop
Shown for comparison after analysis. The pipeline did not see this label.
ProveIt's finding
There is not enough information to verify the reported bug.
Why this finding?
- No curl source code was provided for the revision in question (f6167049805f). The curl_source section explicitly states '(no curl code could be retrieved for this report)'.
- All five claims depend on examining curl's IPFS gateway implementation, specifically how IPFS_PATH is read, validated, and used in filesystem operations.
- The deterministic checks only confirm that realpath() exists somewhere in curl, not how it is (or isn't) applied to IPFS_PATH.
- The external sources (E1, E2, E3) discuss path traversal in unrelated projects (ggen-core, glibc, patch/dpkg) and do not address curl's IPFS implementation.
What still needs checking
- curl source files handling IPFS protocol, particularly the code that reads IPFS_PATH environment variable and uses it to locate gateway binaries or data
- The specific file(s) implementing the 'ipfs://' URL scheme handler
- Any path sanitization, validation, or realpath() calls applied to IPFS_PATH before filesystem access
How this analysis ran 5 claims · 0 citations verified
Checked against curl master on 2025-04-18 (f6167049805f). Test evaluation split. Citation verification checks that a referenced line was in the evidence; it does not prove the model interpreted it correctly.
Review a draft reply to the reporter
Edit and verify before sending.
Thank you for the detailed report. To evaluate this, we need the curl source code that handles the IPFS protocol and the IPFS_PATH environment variable. The provided materials did not include any curl source files. Could you point us to the specific file(s) in the curl repository (e.g., lib/ipfs.c, lib/vipfs.c, or similar) where IPFS_PATH is read and used? With that code, we can check whether path traversal sequences are blocked and whether file contents can leak via error messages.
Inspect all claims and source code 5 claims · 0 code excerpts
Report claims
IPFS_PATH environment variable is not properly sanitized
Read the reasoning
No curl source code was provided to examine how IPFS_PATH is read and used. The claim that it is 'not properly sanitized' cannot be verified or contradicted without seeing the relevant code paths.
curl versions with IPFS support (7.81.0+)
Read the reasoning
The report states IPFS support was added in 7.81.0+, but no curl source code or version history was provided to confirm when IPFS support was introduced or which files handle it.
manipulating directory traversal sequences (e.g., ../../../../etc)
Read the reasoning
The claim about directory traversal sequences (e.g., ../../../../etc) being usable depends on how curl processes the IPFS_PATH value. Without the curl code that joins or resolves this path, the claim cannot be assessed.
leakage of sensitive data (e.g., SSH keys, credentials, system files) via DNS/HTTP error messages
Read the reasoning
The claim that file contents leak via 'DNS/HTTP error messages' requires examining curl's error reporting code paths for IPFS. No such code was provided.
curl -v ipfs://dummycid 2>&1 | grep -A1 "Could not resolve host"
Read the reasoning
The reproduction command is provided, but without the curl source code handling the 'ipfs://' scheme and IPFS_PATH, there is no way to trace whether the described exploit path actually exists.
What the report says about other projects
not addressed The IPFS_PATH environment variable is not properly sanitized, allowing attackers to read arbitrary files by manipulating directory traversal sequences.
not addressed The IPFS_PATH environment variable is not properly sanitized, allowing attackers to read arbitrary files by manipulating directory traversal sequences.
not addressed The IPFS_PATH environment variable is not properly sanitized, allowing attackers to read arbitrary files by manipulating directory traversal sequences.
Read the original report (excerpt)
Source code
No source code was retrieved for this analysis. The evidence may be incomplete.