All rules →
Rules / C/C++
SHIELD-CPP-017

File open with untrusted path

mediumC/C++CWE-22CVSS 6.5

What it detects

fopen or open with a variable path may allow path traversal to unintended files.

How to fix

Canonicalize the path with realpath and confirm it stays inside an allowed directory.

Scan your repo freeFull documentation
Back to all rules
SHIELD-CPP-017: File open with untrusted path — Zennoxa Shield