CVE-2021-24040
JSON

9.8critical

Deserialization of Untrusted Data in parlai

Severity
9.8critical CVSS:3.1 by NVD
Exploit likelihood
17.4% (higher than 98% of CVEs)
Published
Last changed
Assigned by
facebook
Also known as
GHSA-m87f-9fvv-2mggGHSA-mwgj-7x7j-6966PYSEC-2021-330PYSEC-2021-334

Description

Due to use of unsafe YAML deserialization logic, an attacker with the ability to modify local YAML configuration files could provide malicious input, resulting in remote code execution or similar risks. This issue affects ParlAI prior to v1.1.0.

Affected

Product or packageVersionsReported by
Facebook ParlAIfrom unspecified before 1.1.0, before 1.1.0
Not affected: from 1.1.0 before unspecified
CVE List, NVD
parlai (PyPI)before 1.1.0, before 507d066ef432ea27d3e201da08009872a2f37725, before 4374fa2aba383db6526ab36e939eb1cf8ef99879GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub8.4medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:L
GitHubmedium rating
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

Due to use of unsafe YAML deserialization logic, an attacker with the ability to modify local YAML configuration files could provide malicious input, resulting in remote code execution or similar risks. This issue affects ParlAI prior to v1.1.0.

GitHub Advisory Database
Impact

Due to use of unsafe YAML deserialization logic, an attacker with the ability to modify local YAML configuration files could provide malicious input, resulting in remote code execution or similar risks.

Patches

The issue can be patched by upgrading to v1.1.0 or later. It can also be patched by replacing YAML deserialization with equivalent safe_load calls.

References
NVD (es)

Debido al uso de una lógica de deserialización de YAML no segura, un atacante con la capacidad de modificar los archivos de configuración YAML locales podría proporcionar una entrada maliciosa, resultando en una ejecución de código remota o riesgos similares. Este problema afecta a ParlAI versiones anteriores a v1.1.0

PyPA Advisory Database

parlai is a framework for training and evaluating AI models on a variety of openly available dialogue datasets. In affected versions the package is vulnerable to YAML deserialization attack caused by unsafe loading which leads to Arbitary code execution. This security bug is patched by avoiding unsafe loader users should update to version above v1.1.0. If upgrading is not possible then users can change the Loader used to SafeLoader as a workaround. See commit 507d066ef432ea27d3e201da08009872a2f37725 for details.

References

https://github.com/facebookresearch/ParlAI/releases/tag/v1.1.0release-notes, third-party-advisory, web
https://github.com/facebookresearch/ParlAI/security/advisories/GHSA-m87f-9fvv-2mggadvisory, patch, third-party-advisory, web
http://packetstormsecurity.com/files/164136/Facebook-ParlAI-1.0.0-Code-Execution-Deserialization.htmlexploit, third-party-advisory, vdb-entry, web
https://nvd.nist.gov/vuln/detail/CVE-2021-39207advisory
https://github.com/facebookresearch/ParlAI/commit/4374fa2aba383db6526ab36e939eb1cf8ef99879fix, web
https://github.com/facebookresearch/ParlAI/commit/507d066ef432ea27d3e201da08009872a2f37725fix, web
https://github.com/advisories/GHSA-mwgj-7x7j-6966advisory
https://github.com/facebookresearch/ParlAIpackage
https://github.com/pypa/advisory-database/tree/main/vulns/parlai/PYSEC-2021-330.yamlweb
https://github.com/pypa/advisory-database/tree/main/vulns/parlai/PYSEC-2021-334.yamlweb
https://nvd.nist.gov/vuln/detail/CVE-2021-24040advisory
https://github.com/facebookresearch/ParlAI/pull/3402web

Related

Sources

SourceRecordLicence
CVE ListCVE-2021-24040 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-m87f-9fvv-2mgg changed 2026-07-08CC-BY-4.0
GitHub Advisory DatabaseGHSA-mwgj-7x7j-6966 changed 2024-12-04CC-BY-4.0
NVDCVE-2021-24040 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2021-330 changed 2026-07-09CC-BY-4.0
PyPA Advisory DatabasePYSEC-2021-334 changed 2023-11-08CC-BY-4.0