CVE-2026-6863: Go Path Traversal Via Strings Hasprefix
Validating paths mapped into a directory using `strings.HasPrefix` is prone to partial directory traversal if the directory path does not end with a separator. An attacker can construct a path that traverses out of the target directory into a sibling directory with a similar name (e.g., `target` and `target_malicious`). Use `filepath.Rel` and check for ".."
greprules fetch cve-2026-6863-go-path-traversal-via-strings-hasprefix --engine opengrepDescription
Validating paths mapped into a directory using `strings.HasPrefix` is prone to partial directory traversal if the directory path does not end with a separator. An attacker can construct a path that traverses out of the target directory into a sibling directory with a similar name (e.g., `target` and `target_malicious`). Use `filepath.Rel` and check for ".."
Community feedback
0 rule-level signals from signed-in users.
- Useful reports
- 0
- Context false positives
- 0
- Metadata suggestions
- 0
Contextual precision
Aggregated from approved scan feedback. False-positive reports describe observed scan contexts, not a global rule verdict.
- Findings observed
- 0
- Projects
- 0
- Reporters
- 0
Precision details are collecting more signed-in reports before verdict counts or ratios are emphasized.
No approved finding verdicts yet.
No scan diagnostics reported yet.