CVE-2021-41127: Rasa Maliciously Crafted Model Archive Can Vulnerability

HIGH
Advisory Identifier: GHSA-4365-fhm5-qcrx
CVSS 7.3
CWE-23 CWE-22
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2021-41127
GHSA Identifier GHSA-4365-fhm5-qcrx
Severity HIGH
CVSS v3.1 Base Score 7.3
CWE Classification CWE-23: Relative Path Traversal
Affected Product Rasa
Package Ecosystem PyPI
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability High (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.

rasa fixed: 2.8.10
pip install rasa>=2.8.10
Verify Direct and Transitive Dependencies

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

### Impact An 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. ### Patches The vulnerability is fixed in Rasa 2.8.10 ### Workarounds Mitigating 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. ### For more information If you have any questions or comments about this advisory: * Email [the Rasa Security Team](mailto:security@rasa.com)

CVE-2021-41127 Affected Rasa Versions

1 component(s)
Fixed Versions:
2.8.10
Product / Package Ecosystem Affected Versions Fixed Version
rasa
PyPI
< 2.8.10
2.8.10

References

Frequently Asked Questions

What is CVE-2021-41127?
CVE-2021-41127 is a security vulnerability in Rasa involving Maliciously Crafted Model Archive Can Lead To Arbitrary File Write under CWE-23: Relative Path Traversal.
Which Rasa versions are affected?
Affected versions include releases prior to 2.8.10 across affected packages: rasa.
What version fixes CVE-2021-41127?
Upgrading to 2.8.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rasa affected?
Yes, rasa is affected in releases prior to 2.8.10. Upgrade your dependency to 2.8.10 or later.
What is the CVSS score of CVE-2021-41127?
CVE-2021-41127 has a CVSS v3.1 base score of 7.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H.
What CWE is associated with CVE-2021-41127?
CVE-2021-41127 is classified under CWE-23: Relative Path Traversal (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.).
How can I check PyPI dependencies for CVE-2021-41127?
Run the dependency tree command: 'pip show rasa'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}