Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. langchain-core
  4. ›
  5. GHSA-6qv9-48xg-fc7f

GHSA-6qv9-48xg-fc7f: LangChain Vulnerable to Template Injection via Attribute Access in Prompt Templates

November 20, 2025

Attackers who can control template strings (not just template variables) can:

  • Access Python object attributes and internal properties via attribute traversal
  • Extract sensitive information from object internals (e.g., __class__, __globals__)
  • Potentially escalate to more severe attacks depending on the objects passed to templates

References

  • github.com/advisories/GHSA-6qv9-48xg-fc7f
  • github.com/langchain-ai/langchain
  • github.com/langchain-ai/langchain/commit/c4b6ba254e1a49ed91f2e268e6484011c540542a
  • github.com/langchain-ai/langchain/commit/fa7789d6c21222b85211755d822ef698d3b34e00
  • github.com/langchain-ai/langchain/security/advisories/GHSA-6qv9-48xg-fc7f

Code Behaviors & Features

Detect and mitigate GHSA-6qv9-48xg-fc7f 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 0.3.80, all versions starting from 1.0.0 before 1.0.7

Fixed versions

  • 1.0.7
  • 0.3.80

Solution

Upgrade to versions 0.3.80, 1.0.7 or above.

Impact 8.2 HIGH

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

Learn more about CVSS

Weakness

  • CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine

Source file

pypi/langchain-core/GHSA-6qv9-48xg-fc7f.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Mon, 24 Nov 2025 00:19:25 +0000.