CVE-2025-9556 CVE-2025-9556
Attackers can exploit server-side template injection in Langchaingo to read sensitive files like /etc/passwd via malicious prompts.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2025-9556?
CVE-2025-9556 is a critical code injection vulnerability in Langchaingo, published on 12 Sep 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Langchaingo supports the use of jinja2 syntax when parsing prompts, which is in turn parsed using the gonja library v1.5.3. Gonja supports include and extends syntax to read files, which leads to a server side template injection vulnerability within langchaingo, allowing an attacker to insert a statement into a prompt to read the "etc/passwd" file.
Which versions are affected by CVE-2025-9556?
How do I fix CVE-2025-9556?
No fix has been published for CVE-2025-9556 yet. Limit exposure of the affected software until one is available.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2025-9556 being exploited?
There is no known exploitation of CVE-2025-9556 in the wild and no public exploit code.
Sources
Also known as GHSA-mgcj-g55g-rf6h, GHSA-v6f2-g4gw-r4rc.