External Control of Assumed-Immutable Web Parameter Affecting httparty package, versions <0.21.0


Severity

Recommended
0.0
medium
0
10

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

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.18% (56th 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 IDSNYK-RUBY-HTTPARTY-3188560
  • published4 Jan 2023
  • disclosed3 Jan 2023
  • creditmotoyasu-saburi

Introduced: 3 Jan 2023

CVE-2024-22049  (opens in a new tab)
CWE-472  (opens in a new tab)

How to fix?

Upgrade httparty to version 0.21.0 or higher.

Overview

Affected versions of this package are vulnerable to External Control of Assumed-Immutable Web Parameter due to improper escape of the " character in the generate_multipart function, which allows injecting malicious content to the filename parameter via the Content-Disposition header.

PoC

Content-Disposition: form-data; name="avatar"; filename="overwrite_name_field_and_extension.sh"; name="foo"; dummy=".txt"

CVSS Scores

version 3.1