Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions gems/httparty/CVE-2024-22049.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ description: |

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

## GHSA version of Description

"multipart/form-data request tampering vulnerability"
caused by Content-Disposition "filename" lack of escaping in httparty.

`httparty/lib/httparty/request` > `body.rb` > `def generate_multipart`

https://github.com/jnunemaker/httparty/blob/4416141d37fd71bdba4f37589ec265f55aa446ce/lib/httparty/request/body.rb#L43

By exploiting this problem, the following attacks are possible

* An attack that rewrites the \"name\" field according to the
crafted file name, impersonating (overwriting) another field.
* Attacks that rewrite the filename extension at the time
multipart/form-datais generated by tampering with the filename.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need a separate section for the GHSA version of the description? Might be better to merge the information into the above description text.

cvss_v3: 6.5
patched_versions:
- ">= 0.21.0"
Expand All @@ -25,4 +40,5 @@ related:
- https://github.com/jnunemaker/httparty/security/advisories/GHSA-5pq7-52mg-hr42
- https://github.com/jnunemaker/httparty/commit/cdb45a678c43e44570b4e73f84b1abeb5ec22b8e
- https://github.com/jnunemaker/httparty/blob/4416141d37fd71bdba4f37589ec265f55aa446ce/lib/httparty/request/body.rb#L43
- https://bugzilla.mozilla.org/show_bug.cgi?id=1556711
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this link related to httparty? Seems to relate more to Firefox, but does mention Ruby on Rails.

- https://github.com/advisories/GHSA-5pq7-52mg-hr42
29 changes: 0 additions & 29 deletions gems/httparty/GHSA-5pq7-52mg-hr42.yml

This file was deleted.