CVE-2021-41127: Rasa Maliciously Crafted Model Archive Can Vulnerability
HIGHCVE-2021-41127 is a HIGH (CVSS 7.3) maliciously crafted model archive can vulnerability (CWE-23: Relative Path Traversal) affecting Rasa libraries in the PyPI ecosystem. The issue involves maliciously crafted model archive can lead to arbitrary file write. Remediation is available by upgrading affected packages to version 2.8.10.
CVE-2021-41127 at a Glance
Security Impact
CVSS: 7.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H).
How to Fix CVE-2021-41127
To remediate this vulnerability, upgrade all affected Rasa 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 rasa>=2.8.10
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show rasa
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2021-41127, inspect your installed packages using pip:
pip show rasa
Analyze the terminal output to locate any version of Rasa in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.8.10), your application is affected.
Note: The pip show rasa command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-23: Relative Path Traversal, where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory. In Rasa, 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-2021-41127 Affected Rasa Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
rasa
|
PyPI |
< 2.8.10
|
2.8.10
|
References
Frequently Asked Questions
What is CVE-2021-41127?
Which Rasa versions are affected?
What version fixes CVE-2021-41127?
Is rasa affected?
What is the CVSS score of CVE-2021-41127?
What CWE is associated with CVE-2021-41127?
How can I check PyPI dependencies for CVE-2021-41127?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4365-fhm5-qcrx",
"modified" : "2024-10-16T20:45:22Z",
"published" : "2021-10-22T16:19:13Z",
"aliases" : [ "CVE-2021-41127" ],
"summary" : "Maliciously Crafted Model Archive Can Lead To Arbitrary File Write",
"details" : "### Impact\nAn Archive Extraction (Zip Slip) vulnerability in the functionality that allows a user to load a trained model archive in Rasa 2.8.9 and older allows an attacker arbitrary write capability within specific directories using a malicious crafted archive file.\n\n### Patches\nThe vulnerability is fixed in Rasa 2.8.10\n\n### Workarounds\nMitigating steps for vulnerable end users are to ensure that they do not upload untrusted model files, and restrict CLI or API endpoint access where a malicious actor could target a deployed Rasa instance.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email [the Rasa Security Team](mailto:security@rasa.com)\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "rasa"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.8.10"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/RasaHQ/rasa/security/advisories/GHSA-4365-fhm5-qcrx"
}, {
"type" : "WEB",
"url" : "https://github.com/RasaHQ/rasa/commit/1b6b502f52d73b4f8cd1959ce724b8ad0eb33989"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/RasaHQ/rasa"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/rasa/PYSEC-2021-381.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-23" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-10-21T20:32:19Z",
"nvd_published_at" : "2021-10-21T21:15:00Z"
}
}