Executive brief
Graphify is an open-source tool used to turn codebases into knowledge graphs for AI assistants. A security flaw allows attackers to bypass internal network protections, potentially letting them access private data or internal services that are not supposed to be reachable from the internet. This could lead to the exposure of sensitive configuration data or unauthorized actions on internal development servers.
Technical details
A Time-of-Check Time-of-Use (TOCTOU) race condition exists in the 'graphify add' URL ingestion path. The application attempts to prevent SSRF by resolving a hostname and checking the resulting IP against a blocklist; however, it then performs a second, independent DNS resolution when fetching the content. An attacker using a DNS rebinding service with a low TTL can provide a public IP for the first check and a local/internal IP (such as 127.0.0.1 or cloud metadata services) for the actual request. This allows the attacker to reach internal GET endpoints, which may lead to information disclosure or remote code execution depending on the internal services exposed. The issue is fixed in version 0.5.4.
Affected products
- safishamsi graphify (graphifyy) >=0.3.2, <=0.4.29
Timeline
- 2026-04-20: disclosed: Reported privately to maintainer
- 2026-04-28: patched: Fix committed in version 0.5.4
- 2026-07-20: advisory: Public advisory and CVE published