CVE-2021-39207
JSON

8.4high

Deserialization of Untrusted Data in parlai

Severity
8.4high CVSS:3.1 by GitHub_M
Exploit likelihood
1.79% (higher than 79% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-m87f-9fvv-2mggGHSA-mwgj-7x7j-6966PYSEC-2021-330PYSEC-2021-334

Description

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.

Affected

Product or packageVersionsReported by
facebookresearch ParlAI< 1.1.0CVE List
parlai (PyPI)before 1.1.0, before 507d066ef432ea27d3e201da08009872a2f37725, before 4374fa2aba383db6526ab36e939eb1cf8ef99879GitHub Advisory Database, PyPA Advisory Database
facebook parlaibefore 1.1.0NVD

All scores

GitHub_M8.4high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L
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
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD6.5medium CVSS:2.0AV:N/AC:L/Au:S/C:P/I:P/A:P

Classification

What each source says

CVE List

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.

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
GitHub Advisory Database

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.

NVD (es)

parlai es un marco de trabajo para entrenar y evaluar modelos de IA en una variedad de conjuntos de datos de diálogo disponibles abiertamente. En las versiones afectadas el paquete es vulnerable a un ataque de deserialización de YAML causado por una carga no segura que conlleva a una ejecución de código arbitrario. Este bug de seguridad es parcheado al evitar una carga no segura, los usuarios deben actualizar a una versión superior a v1.1.0. Si la actualización no es posible, entonces los usuarios pueden cambiar el Cargador usado a SafeLoader como solución. Consulte el commit 507d066ef432ea27d3e201da08009872a2f37725 para más detalles

References

https://github.com/facebookresearch/ParlAI/security/advisories/GHSA-m87f-9fvv-2mggadvisory, patch, third-party-advisory, web
https://github.com/facebookresearch/ParlAI/commit/4374fa2aba383db6526ab36e939eb1cf8ef99879fix, patch, third-party-advisory, web
https://github.com/facebookresearch/ParlAI/commit/507d066ef432ea27d3e201da08009872a2f37725fix, patch, third-party-advisory, web
https://nvd.nist.gov/vuln/detail/CVE-2021-39207advisory
https://github.com/advisories/GHSA-mwgj-7x7j-6966advisory
https://github.com/facebookresearch/ParlAIpackage
https://github.com/facebookresearch/ParlAI/releases/tag/v1.1.0web
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
http://packetstormsecurity.com/files/164136/Facebook-ParlAI-1.0.0-Code-Execution-Deserialization.htmlweb
https://nvd.nist.gov/vuln/detail/CVE-2021-24040advisory
https://github.com/facebookresearch/ParlAI/pull/3402web

Related

Sources

SourceRecordLicence
CVE ListCVE-2021-39207 changed 2024-08-04CVE 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-39207 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