Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. engramx
  4. ›
  5. GHSA-2r2p-4cgf-hv7h

GHSA-2r2p-4cgf-hv7h: engram: HTTP server CORS wildcard + auth-off-by-default enables CSRF graph exfiltration and persistent indirect prompt injection

April 22, 2026

The local HTTP server started by engram server (binding 127.0.0.1:7337 by default) was exposed to any browser origin with no authentication unless ENGRAM_API_TOKEN was explicitly set. Combined with Access-Control-Allow-Origin: * on every response and a body parser that did not require Content-Type: application/json, this allowed a malicious web page the developer visited to:

  1. Exfiltrate the local knowledge graph via GET /query and GET /stats (function names, file layout, recorded decisions/mistakes).
  2. Inject persistent prompt-injection payloads via POST /learn, which wrote mistake/decision nodes that were later surfaced as system-reminders to the user’s AI coding agent on every future session and file edit.

Severity: High — confidentiality + persistent indirect prompt injection against the user’s coding agent.

References

  • github.com/NickCirv/engram
  • github.com/NickCirv/engram/issues/7
  • github.com/NickCirv/engram/security/advisories/GHSA-2r2p-4cgf-hv7h
  • github.com/advisories/GHSA-2r2p-4cgf-hv7h

Code Behaviors & Features

Detect and mitigate GHSA-2r2p-4cgf-hv7h with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.0.2

Fixed versions

  • 2.0.2

Solution

Upgrade to version 2.0.2 or above.

Impact 8.1 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-1188: Initialization of a Resource with an Insecure Default
  • CWE-306: Missing Authentication for Critical Function
  • CWE-352: Cross-Site Request Forgery (CSRF)
  • CWE-942: Permissive Cross-domain Policy with Untrusted Domains

Source file

npm/engramx/GHSA-2r2p-4cgf-hv7h.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:19:29 +0000.