{"schemaVersion":3,"id":"CVE-2021-24040","aliases":["GHSA-m87f-9fvv-2mgg","CVE-2021-39207","GHSA-mwgj-7x7j-6966","PYSEC-2021-330","PYSEC-2021-334"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2021-09-10T22:10:10.000Z","modified":"2024-08-03T19:21:17.219Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":8.8,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"4.0","versionLabel":"v4.0","source":"OSV · Pypi","score":5.6,"severity":"medium","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:L","exploitability":null,"impact":null,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Pypi","score":8.4,"severity":"high","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:L","exploitability":4.6,"impact":10,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":8.8,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":6.5,"severity":"medium","vector":"AV:N/AC:L/Au:S/C:P/I:P/A:P","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.17353,"percentile":0.97096,"severity":"medium","asOf":"2026-10-20T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-20T00:00:00.000Z","baselineScore":0.17353},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.17353,"percentile":0.97096}],"last30":[{"date":"2026-09-20T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.17353,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.17353,"percentile":0.97096}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"REF_8437A69E42B47829","name":"Exploit Reference (packetstormsecurity.com)","source":"reference","url":"http://packetstormsecurity.com/files/164136/Facebook-ParlAI-1.0.0-Code-Execution-Deserialization.html","maturity":"unknown","reliabilityScore":0.2,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null},{"id":"50289","name":"Facebook ParlAI 1.0.0 -  Deserialization of Untrusted Data in parlai","source":"exploit-database","url":"https://www.exploit-db.com/exploits/50289","maturity":"poc","reliabilityScore":0.5,"verified":false,"type":"local","platforms":["python"],"requiresAuth":null,"exploitdb":{"verified":false,"type":"local","platform":"python","file":"exploits/python/local/50289.py","codes":["CVE-2021-24040"]},"metasploit":null}],"exploitCount":2,"weaknesses":[{"id":"CWE-502","name":"Deserialization of Untrusted Data","description":"The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"Medium","url":"https://cwe.mitre.org/data/definitions/502.html"}],"affected":[{"vendor":"facebook","product":"parlai","name":"parlai","label":"parlai","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ unspecified, < 1.1.0","noFixRecorded":false,"fixedIn":null},{"text":"< 1.1.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ unspecified, < 1.1.0 | < 1.1.0","eol":null,"hubHref":"/vendor/facebook/parlai"},{"vendor":"PyPI","product":"parlai","name":"parlai","label":"parlai","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/parlai","purlType":"pypi","versions":[{"text":"< 1.1.0","noFixRecorded":false,"fixedIn":null},{"text":"< 4374fa2aba383db6526ab36e939eb1cf8ef99879","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.1.0 | < 4374fa2aba383db6526ab36e939eb1cf8ef99879","eol":null,"hubHref":null}],"affectedCount":2,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/facebookresearch/ParlAI/releases/tag/v1.1.0","label":"github.com/facebookresearch/ParlAI/releases/tag/v1.1.0","hostname":"github.com","tags":["X Refsource MISC","WEB","Release Notes","Third Party Advisory"]},{"url":"https://github.com/facebookresearch/ParlAI/security/advisories/GHSA-m87f-9fvv-2mgg","label":"github.com/facebookresearch/ParlAI/security/advisories/GHSA-m87f-9fvv-2mgg","hostname":"github.com","tags":["X Refsource CONFIRM","WEB","Advisory","Patch","Third Party Advisory"]},{"url":"http://packetstormsecurity.com/files/164136/Facebook-ParlAI-1.0.0-Code-Execution-Deserialization.html","label":"packetstormsecurity.com/files/164136/Facebook-ParlAI-1.0.0-Code-Execution-Deserialization.html","hostname":"packetstormsecurity.com","tags":["X Refsource MISC","WEB","Exploit","Third Party Advisory","VDB Entry"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-39207","label":"nvd.nist.gov/vuln/detail/CVE-2021-39207","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/facebookresearch/ParlAI/commit/4374fa2aba383db6526ab36e939eb1cf8ef99879","label":"github.com/facebookresearch/ParlAI/commit/4374fa2aba383db6526ab36e939eb1cf8ef99879","hostname":"github.com","tags":["WEB","FIX","Patch","Third Party Advisory"]},{"url":"https://github.com/facebookresearch/ParlAI/commit/507d066ef432ea27d3e201da08009872a2f37725","label":"github.com/facebookresearch/ParlAI/commit/507d066ef432ea27d3e201da08009872a2f37725","hostname":"github.com","tags":["WEB","FIX","Patch","Third Party Advisory"]},{"url":"https://github.com/advisories/GHSA-mwgj-7x7j-6966","label":"github.com/advisories/GHSA-mwgj-7x7j-6966","hostname":"github.com","tags":["Advisory"]},{"url":"https://github.com/facebookresearch/ParlAI","label":"github.com/facebookresearch/ParlAI","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/parlai/PYSEC-2021-330.yaml","label":"github.com/pypa/advisory-database/tree/main/vulns/parlai/PYSEC-2021-330.yaml","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/parlai/PYSEC-2021-334.yaml","label":"github.com/pypa/advisory-database/tree/main/vulns/parlai/PYSEC-2021-334.yaml","hostname":"github.com","tags":["WEB"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-24040","label":"nvd.nist.gov/vuln/detail/CVE-2021-24040","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/facebookresearch/ParlAI/pull/3402","label":"github.com/facebookresearch/ParlAI/pull/3402","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/facebookresearch/ParlAI/pull/3429","label":"github.com/facebookresearch/ParlAI/pull/3429","hostname":"github.com","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2021-09-10T22:10:10.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-03T19:21:17.219Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":49,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-21T06:34:09.153Z","stale":false,"partial":false}}