Arbitrary Code Injection Affecting github.com/tmc/langchaingo/prompts package, versions <0.1.14-pre.0


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.07% (23rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMTMCLANGCHAINGOPROMPTS-12705371
  • published17 Sept 2025
  • disclosed12 Sept 2025
  • creditUnknown

Introduced: 12 Sep 2025

NewCVE-2025-9556  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade github.com/tmc/langchaingo/prompts to version 0.1.14-pre.0 or higher.

Overview

Affected versions of this package are vulnerable to Arbitrary Code Injection via the gonja template parsing process. An attacker can access arbitrary files on the server by injecting malicious template statements into prompts. Allowing an attacker to insert a statement into a prompt to read the etc/passwd file.

CVSS Base Scores

version 4.0
version 3.1