CVE-2025-25362: Spacy llm Spacy-LLM Server-Side Template Injection (SSTI) Vulnerability
HIGHCVE-2025-25362 is a HIGH (CVSS 9.8) spacy-llm server-side template injection (ssti) vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Spacy llm libraries in the PyPI ecosystem. The issue involves spacy-llm server-side template injection (ssti) vulnerability. Remediation is available by upgrading affected packages to version 0.7.3.
CVE-2025-25362 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2025-25362
To remediate this vulnerability, upgrade all affected Spacy llm dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install spacy-llm>=0.7.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show spacy-llm
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-25362, inspect your installed packages using pip:
pip show spacy-llm
Analyze the terminal output to locate any version of Spacy llm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.7.3), your application is affected.
Note: The pip show spacy-llm command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Spacy llm, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-25362 Affected Spacy llm Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
spacy-llm
|
PyPI |
< 0.7.3
|
0.7.3
|
References
Frequently Asked Questions
What is CVE-2025-25362?
Which Spacy llm versions are affected?
What version fixes CVE-2025-25362?
Is spacy-llm affected?
What is the CVSS score of CVE-2025-25362?
What CWE is associated with CVE-2025-25362?
How can I check PyPI dependencies for CVE-2025-25362?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-793v-gxfp-9q9h",
"modified" : "2025-04-02T22:59:09Z",
"published" : "2025-03-05T21:32:13Z",
"aliases" : [ "CVE-2025-25362" ],
"summary" : "Spacy-LLM Server-Side Template Injection (SSTI) vulnerability",
"details" : "A Server-Side Template Injection (SSTI) vulnerability in Spacy-LLM v0.7.2 allows attackers to execute arbitrary code via injecting a crafted payload into the template field.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "spacy-llm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.7.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.7.2"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-25362"
}, {
"type" : "WEB",
"url" : "https://github.com/explosion/spacy-llm/issues/492"
}, {
"type" : "WEB",
"url" : "https://github.com/explosion/spacy-llm/pull/491"
}, {
"type" : "WEB",
"url" : "https://github.com/explosion/spacy-llm/commit/8bde0490cc1e9de9dd2e84480b7b5cd18a94d739"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/explosion/spacy-llm"
}, {
"type" : "WEB",
"url" : "https://www.hacktivesecurity.com/blog/2025/04/01/cve-2025-25362-old-vulnerabilities-new-victims-breaking-llm-prompts-with-ssti"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1336", "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-03-05T22:21:46Z",
"nvd_published_at" : "2025-03-05T21:15:19Z"
}
}