Medium, CVSS 6.8PyPIAmendedPublished
Graphify Fortran extractor: incomplete cpp #include hardening allows arbitrary host-file read/exfiltration when indexing an untrusted repo
GHSA-pcc4-rvhr-2pr8
- Affected
- PyPI graphifyy >= 0.7.2, < 0.9.70
- Fixed in
- 0.9.70· Vendor fix available
- Issue
- The Fortran extractor's C-preprocessor step (graphify/extractors/fortran.py, cpppreprocess) applies an incomplete #include hardening. The -nostdinc -I /dev/null flags it relies on (comment "Security (F-007)") do not stop a capital-F Fortran source file from including absolute paths (#include "/etc/passwd") or from path-traversing out of the corpus (#include "../../../../home/victim/.ssh/idrsa"). cpp always searches the directory of the file being preprocessed for quoted includes and always honours absolute include paths, regardless of -nostdinc/-I. As a result, indexing an untrusted repository that contains a .F/.F90/.F95/.F03/.F08 file reads arbitrary local files off the host and inlines their contents into the knowledge graph, which is then shipped to the LLM/agent and written to the on-disk, shareable output (graph.json, GRAPHREPORT.md, the Obsidian wiki, HTML/SVG exports). This is the exact "corpus-side file-exfiltration vector" the F-007 comment says it is defending…
Recommended action: Upgrade to 0.9.70 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.