Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. langchain-core
  4. ›
  5. CVE-2025-65106

CVE-2025-65106: LangChain Vulnerable to Template Injection via Attribute Access in Prompt Templates

November 20, 2025 (updated December 9, 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

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
  • nvd.nist.gov/vuln/detail/CVE-2025-65106

Code Behaviors & Features

Detect and mitigate CVE-2025-65106 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

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/CVE-2025-65106.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sun, 08 Nov 2026 00:17:26 +0000.