{"data":{"id":"d38cf4b3-205f-440a-b5e0-6e6467e20cd0","title":"GHSA-926x-3r5x-gfhw: LangChain has incomplete f-string validation in prompt templates","summary":"LangChain's f-string prompt-template validation was incomplete in two ways. DictPromptTemplate and ImagePromptTemplate accepted templates with attribute access or indexing expressions and evaluated them during formatting, and validation did not reject nested replacement fields inside format specifiers. Exposure needs untrusted template strings and richer Python objects passed into formatting.","solution":"LangChain now applies f-string safety validation consistently to DictPromptTemplate and ImagePromptTemplate, rejecting templates with attribute access or indexing during construction and deserialization. It also rejects nested replacement fields inside format specifiers, raising an error for variable names containing '.' or '[]' and format specifiers containing '{' or '}'. Ordinary f-string format specifiers and conversions remain supported.","labels":["security"],"sourceUrl":"https://github.com/advisories/GHSA-926x-3r5x-gfhw","publishedAt":"2026-04-08T21:51:32.000Z","cveId":null,"cweIds":null,"cvssScore":null,"cvssSeverity":"medium","severity":"medium","attackType":["prompt_injection"],"issueType":"vulnerability","affectedPackages":["langchain-core@>= 1.0.0a1, < 1.2.28 (fixed: 1.2.28)","langchain-core@< 0.3.83 (fixed: 0.3.84)"],"affectedPackageNames":["langchain-core"],"affectedPackageRefs":["pypi:langchain-core"],"affectedVendors":["LangChain"],"affectedVendorsRaw":["LangChain","DictPromptTemplate","ImagePromptTemplate"],"classifierModel":"claude-haiku-5-5","classifierPromptVersion":"v4","summaryPromptVersion":"v2","headline":null,"headlinePromptVersion":null,"cvssVector":null,"attackVector":null,"attackComplexity":null,"privilegesRequired":null,"userInteraction":null,"exploitMaturity":null,"epssScore":null,"epssCheckedAt":null,"kevDateAdded":null,"advisoryAliases":["GHSA-926x-3r5x-gfhw"],"affectedPackagesSource":null,"affectedPackagesCheckedAt":null,"patchAvailable":true,"disclosureDate":"2026-04-08T21:51:32.000Z","fixReleasedAt":"2026-04-08T18:19:32.823Z","daysToFix":0,"fixCheckedAt":"2026-10-29T21:38:32.343Z","capecIds":null,"crossRefCount":0,"attackSophistication":"moderate","impactType":["confidentiality"],"aiComponentTargeted":"framework","llmSpecific":false,"classifierConfidence":0.95,"researchCategory":null,"atlasIds":["AML.T0051"],"fixes":[{"ecosystem":"pypi","name":"langchain-core","fixedVersion":"0.3.84","matchedVersion":"0.3.84","fixReleasedAt":"2026-04-08T19:13:57.818Z","daysToFix":0,"match":"ecosystem","source":"tracked","status":"found","checkedAt":"2026-10-29T21:38:32.196Z"},{"ecosystem":"pypi","name":"langchain-core","fixedVersion":"1.2.28","matchedVersion":"1.2.28","fixReleasedAt":"2026-04-08T18:19:32.823Z","daysToFix":0,"match":"ecosystem","source":"tracked","status":"found","checkedAt":"2026-10-29T21:38:32.196Z"}]}}