CWE-472
AllowedExternal Control of Assumed-Immutable Web Parameter
Abstraction: Base · Status: Draft
The web application does not sufficiently verify inputs that are assumed to be immutable but are actually externally controllable, such as hidden form fields.
201 vulnerabilities reference this CWE, most recent first.
GHSA-4M59-9RC7-XWFX
Vulnerability from github – Published: 2026-06-09 00:33 – Updated: 2026-06-09 03:31Out of bounds read in Media in Google Chrome on ChromeOS prior to 149.0.7827.103 allowed a remote attacker who had compromised the renderer process to obtain potentially sensitive information from process memory via a crafted HTML page. (Chromium security severity: High)
{
"affected": [],
"aliases": [
"CVE-2026-11669"
],
"database_specific": {
"cwe_ids": [
"CWE-472"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-06-09T00:16:50Z",
"severity": "MODERATE"
},
"details": "Out of bounds read in Media in Google Chrome on ChromeOS prior to 149.0.7827.103 allowed a remote attacker who had compromised the renderer process to obtain potentially sensitive information from process memory via a crafted HTML page. (Chromium security severity: High)",
"id": "GHSA-4m59-9rc7-xwfx",
"modified": "2026-06-09T03:31:39Z",
"published": "2026-06-09T00:33:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-11669"
},
{
"type": "WEB",
"url": "https://chromereleases.googleblog.com/2026/06/stable-channel-update-for-desktop_0153744567.html"
},
{
"type": "WEB",
"url": "https://issues.chromium.org/issues/515429352"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-4MPW-X48V-Q2M5
Vulnerability from github – Published: 2026-05-14 21:30 – Updated: 2026-05-15 00:30Integer overflow in ANGLE in Google Chrome on Windows prior to 148.0.7778.168 allowed a remote attacker to perform an out of bounds memory write via a crafted HTML page. (Chromium security severity: Critical)
{
"affected": [],
"aliases": [
"CVE-2026-8519"
],
"database_specific": {
"cwe_ids": [
"CWE-472"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-05-14T20:17:12Z",
"severity": "HIGH"
},
"details": "Integer overflow in ANGLE in Google Chrome on Windows prior to 148.0.7778.168 allowed a remote attacker to perform an out of bounds memory write via a crafted HTML page. (Chromium security severity: Critical)",
"id": "GHSA-4mpw-x48v-q2m5",
"modified": "2026-05-15T00:30:29Z",
"published": "2026-05-14T21:30:44Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-8519"
},
{
"type": "WEB",
"url": "https://chromereleases.googleblog.com/2026/05/stable-channel-update-for-desktop_12.html"
},
{
"type": "WEB",
"url": "https://issues.chromium.org/issues/498400132"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-4P5P-P6W9-4WXG
Vulnerability from github – Published: 2025-07-07 18:32 – Updated: 2025-07-08 18:31fblog through 983bede allows account takeover via the password reset feature because SERVER_NAME is not configured and thus a reset depends on the Host HTTP header.
{
"affected": [],
"aliases": [
"CVE-2025-43933"
],
"database_specific": {
"cwe_ids": [
"CWE-472"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-07-07T16:15:23Z",
"severity": "CRITICAL"
},
"details": "fblog through 983bede allows account takeover via the password reset feature because SERVER_NAME is not configured and thus a reset depends on the Host HTTP header.",
"id": "GHSA-4p5p-p6w9-4wxg",
"modified": "2025-07-08T18:31:22Z",
"published": "2025-07-07T18:32:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-43933"
},
{
"type": "WEB",
"url": "https://github.com/ghost123gg/fblog/issues/5"
},
{
"type": "WEB",
"url": "https://github.com/ghost123gg/fblog/blob/983bedec9f837a54ab2dfd358a9cb45504a2e709/app/templates/auth/email/resetPassword.html#L1-L8"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-52PC-9JV4-4M3G
Vulnerability from github – Published: 2026-06-05 00:31 – Updated: 2026-06-05 03:31Integer overflow in V8 in Google Chrome prior to 149.0.7827.53 allowed a remote attacker to execute arbitrary code inside a sandbox via a crafted HTML page. (Chromium security severity: High)
{
"affected": [],
"aliases": [
"CVE-2026-10964"
],
"database_specific": {
"cwe_ids": [
"CWE-472"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-06-04T23:16:59Z",
"severity": "HIGH"
},
"details": "Integer overflow in V8 in Google Chrome prior to 149.0.7827.53 allowed a remote attacker to execute arbitrary code inside a sandbox via a crafted HTML page. (Chromium security severity: High)",
"id": "GHSA-52pc-9jv4-4m3g",
"modified": "2026-06-05T03:31:32Z",
"published": "2026-06-05T00:31:40Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-10964"
},
{
"type": "WEB",
"url": "https://chromereleases.googleblog.com/2026/06/stable-channel-update-for-desktop.html"
},
{
"type": "WEB",
"url": "https://issues.chromium.org/issues/511228272"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-5JX8-96F6-FV22
Vulnerability from github – Published: 2025-01-04 03:33 – Updated: 2025-01-06 18:31An issue was discovered in Optimizely Configured Commerce before 5.2.2408. A medium-severity issue concerning business logic exists in the Commerce B2B application, which allows storefront visitors to purchase discontinued products in specific scenarios where requests are altered before reaching the server.
{
"affected": [],
"aliases": [
"CVE-2025-22384"
],
"database_specific": {
"cwe_ids": [
"CWE-472"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-01-04T02:15:06Z",
"severity": "HIGH"
},
"details": "An issue was discovered in Optimizely Configured Commerce before 5.2.2408. A medium-severity issue concerning business logic exists in the Commerce B2B application, which allows storefront visitors to purchase discontinued products in specific scenarios where requests are altered before reaching the server.",
"id": "GHSA-5jx8-96f6-fv22",
"modified": "2025-01-06T18:31:02Z",
"published": "2025-01-04T03:33:08Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-22384"
},
{
"type": "WEB",
"url": "https://support.optimizely.com/hc/en-us/articles/32694560473741-Configured-Commerce-Security-Advisory-COM-2024-02"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-5M5W-XXC6-6J93
Vulnerability from github – Published: 2026-06-05 00:31 – Updated: 2026-06-06 15:31Integer overflow in V8 in Google Chrome prior to 149.0.7827.53 allowed a remote attacker to execute arbitrary code inside a sandbox via a crafted HTML page. (Chromium security severity: Medium)
{
"affected": [],
"aliases": [
"CVE-2026-11211"
],
"database_specific": {
"cwe_ids": [
"CWE-472"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-06-04T23:17:28Z",
"severity": "HIGH"
},
"details": "Integer overflow in V8 in Google Chrome prior to 149.0.7827.53 allowed a remote attacker to execute arbitrary code inside a sandbox via a crafted HTML page. (Chromium security severity: Medium)",
"id": "GHSA-5m5w-xxc6-6j93",
"modified": "2026-06-06T15:31:18Z",
"published": "2026-06-05T00:31:51Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-11211"
},
{
"type": "WEB",
"url": "https://chromereleases.googleblog.com/2026/06/stable-channel-update-for-desktop.html"
},
{
"type": "WEB",
"url": "https://issues.chromium.org/issues/506629455"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-5M7R-G86C-VQW2
Vulnerability from github – Published: 2026-08-19 15:32 – Updated: 2026-08-19 15:32Joomla Extension - balbooa.com - Pre-auth Payment Amount Tampering in Balbooa Forms < 2.4.3.2 - The stripeCharges and payAuthorize endpoints accept the charge total from a client-controlled request parameter and forward it to the payment gateway without recomputing it from the form's configured product prices. Neither endpoint enforces authentication or CSRF checks. An unauthenticated attacker can purchase any priced item for an arbitrary amount (e.g., $0.01), and can additionally forge line items, quantities, and shipping.
{
"affected": [],
"aliases": [
"CVE-2026-67363"
],
"database_specific": {
"cwe_ids": [
"CWE-472"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-08-19T13:17:50Z",
"severity": "HIGH"
},
"details": "Joomla Extension - balbooa.com - Pre-auth Payment Amount Tampering in Balbooa Forms \u003c 2.4.3.2 - The stripeCharges and payAuthorize endpoints accept the charge total from a client-controlled request parameter and forward it to the payment gateway without recomputing it from the form\u0027s configured product prices. Neither endpoint enforces authentication or CSRF checks. An unauthenticated attacker can purchase any priced item for an arbitrary amount (e.g., $0.01), and can additionally forge line items, quantities, and shipping.",
"id": "GHSA-5m7r-g86c-vqw2",
"modified": "2026-08-19T15:32:23Z",
"published": "2026-08-19T15:32:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-67363"
},
{
"type": "WEB",
"url": "https://www.balbooa.com"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:H/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-5P7G-3PF4-FR58
Vulnerability from github – Published: 2025-03-19 06:31 – Updated: 2025-03-19 09:30Shearwater SecurEnvoy SecurAccess Enrol before 9.4.515 allows authentication through only a six-digit TOTP code (skipping a password check) if an HTTP POST request contains a SESSION parameter.
{
"affected": [],
"aliases": [
"CVE-2025-30236"
],
"database_specific": {
"cwe_ids": [
"CWE-472"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-03-19T06:15:16Z",
"severity": "HIGH"
},
"details": "Shearwater SecurEnvoy SecurAccess Enrol before 9.4.515 allows authentication through only a six-digit TOTP code (skipping a password check) if an HTTP POST request contains a SESSION parameter.",
"id": "GHSA-5p7g-3pf4-fr58",
"modified": "2025-03-19T09:30:26Z",
"published": "2025-03-19T06:31:54Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-30236"
},
{
"type": "WEB",
"url": "https://reserge.org/probabilistically-breaking-securenvoy-totp"
},
{
"type": "WEB",
"url": "https://securenvoy.com/wp-content/uploads/2025/03/Release-Notes-9.4.515.pdf"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:H/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-5PQ7-52MG-HR42
Vulnerability from github – Published: 2023-01-03 13:36 – Updated: 2024-01-05 15:32Impact
I found "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-data is generated by tampering with the filename
For example, this vulnerability can be exploited to generate the following Content-Disposition.
Normal Request example: normal input filename:
abc.txtgenerated normal header in multipart/form-data
Content-Disposition: form-data; name="avatar"; filename="abc.txt"Malicious Request example malicious input filename:
overwrite_name_field_and_extension.sh"; name="foo"; dummy=".txtgenerated malicious header in multipart/form-data:
Content-Disposition: form-data; name="avatar"; filename="overwrite_name_field_and_extension.sh"; name="foo"; dummy=".txt"
The Abused Header has multiple name ( avatar & foo ) fields and the "filename" has been rewritten from *.txt to *.sh .
These problems can result in successful or unsuccessful attacks, depending on the behavior of the parser receiving the request. I have confirmed that the attack succeeds, at least in the following frameworks
- Spring (Java)
- Ktor (Kotlin)
- Ruby on Rails (Ruby)
The cause of this problem is the lack of escaping of the " (Double-Quote) character in Content-Disposition > filename.
WhatWG's HTML spec has an escaping requirement.
https://html.spec.whatwg.org/#multipart-form-data
For field names and filenames for file fields, the result of the encoding in the previous bullet point must be escaped by replacing any 0x0A (LF) bytes with the byte sequence
%0A, 0x0D (CR) with%0Dand 0x22 (") with%22. The user agent must not perform any other escapes.
Patches
As noted at the beginning of this section, encoding must be done as described in the HTML Spec.
https://html.spec.whatwg.org/#multipart-form-data
For field names and filenames for file fields, the result of the encoding in the previous bullet point must be escaped by replacing any 0x0A (LF) bytes with the byte sequence
%0A, 0x0D (CR) with%0Dand 0x22 (") with%22. The user agent must not perform any other escapes.
Therefore, it is recommended that Content-Disposition be modified by either of the following
Before:
Content-Disposition: attachment;filename="malicious.sh";dummy=.txtAfter:
Content-Disposition: attachment;filename="%22malicious.sh%22;dummy=.txt"
https://github.com/jnunemaker/httparty/blob/4416141d37fd71bdba4f37589ec265f55aa446ce/lib/httparty/request/body.rb#L43
file_name.gsub('"', '%22')
Also, as for \r, \n, URL Encode is not done, but it is not newlines, so it seemed to be OK.
However, since there may be omissions, it is safer to URL encode these as well, if possible.
( \r to %0A and \d to %0D )
PoC
PoC Environment
OS: macOS Monterey(12.3) Ruby ver: ruby 3.1.2p20 httparty ver: 0.20.0 (Python3 - HTTP Request Logging Server)
PoC procedure
(Linux or MacOS is required.
This is because Windows does not allow file names containing " (double-quote) .)
- Create Project
$ mkdir my-app
$ cd my-app
$ gem install httparty
- Create malicious file
$ touch 'overwrite_name_field_and_extension.sh"; name="foo"; dummy=".txt'
- Generate Vuln code
$ vi example.rb
require 'httparty'
filename = 'overwrite_name_field_and_extension.sh"; name="foo"; dummy=".txt'
HTTParty.post('http://localhost:12345/',
body: {
name: 'Foo Bar',
email: 'example@email.com',
avatar: File.open(filename)
}
)
- Run Logging Server
I write Python code, but any method will work as long as you can see the HTTP Request Body. (e.g. Debugger, HTTP Logging Server, Packet Capture)
$ vi logging.py
from http.server import HTTPServer
from http.server import BaseHTTPRequestHandler
class LoggingServer(BaseHTTPRequestHandler):
def do_POST(self):
self.send_response(200)
self.end_headers()
self.wfile.write("ok".encode("utf-8"))
content_length = int(self.headers['Content-Length'])
post_data = self.rfile.read(content_length)
print("POST request,\nPath: %s\nHeaders:\n%s\n\nBody:\n%s\n",
str(self.path), str(self.headers), post_data.decode('utf-8'))
self.wfile.write("POST request for {}".format(self.path).encode('utf-8'))
ip = '127.0.0.1'
port = 12345
server = HTTPServer((ip, port), LoggingServer)
server.serve_forever()
$ python logging.py
- Run & Logging server
$ run example.rb
Return Request Header & Body:
User-Agent: Ruby Content-Type: multipart/form-data; boundary=------------------------F857UcxRc2J1zFOz Connection: close Host: localhost:12345 Content-Length: 457
--------------------------F857UcxRc2J1zFOz Content-Disposition: form-data; name="name"
Foo Bar --------------------------F857UcxRc2J1zFOz Content-Disposition: form-data; name="email"
example@email.com --------------------------F857UcxRc2J1zFOz Content-Disposition: form-data; name="avatar"; filename="overwrite_name_field_and_extension.sh"; name="foo"; dummy=".txt" Content-Type: text/plain
abc --------------------------F857UcxRc2J1zFOz--
Content-Disposition:
Content-Disposition: form-data; name="avatar"; filename="overwrite_name_field_and_extension.sh"; name="foo"; dummy=".txt"
- name fields is duplicate (avator & foo)
- filename & extension tampering ( .txt --> .sh )
References
-
I also include a similar report that I previously reported to Firefox. https://bugzilla.mozilla.org/show_bug.cgi?id=1556711
-
I will post some examples of frameworks that did not have problems as reference.
Golang https://github.com/golang/go/blob/e0e0c8fe9881bbbfe689ad94ca5dddbb252e4233/src/mime/multipart/writer.go#L144
Spring https://github.com/spring-projects/spring-framework/blob/4cc91e46b210b4e4e7ed182f93994511391b54ed/spring-web/src/main/java/org/springframework/http/ContentDisposition.java#L259-L267
Symphony https://github.com/symfony/symfony/blob/123b1651c4a7e219ba59074441badfac65525efe/src/Symfony/Component/Mime/Header/ParameterizedHeader.php#L128-L133
For more information
If you have any questions or comments about this advisory: * Email us at kumagoro_alice@yahoo.co.jp
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 0.20.0"
},
"package": {
"ecosystem": "RubyGems",
"name": "httparty"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.21.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-22049"
],
"database_specific": {
"cwe_ids": [
"CWE-472"
],
"github_reviewed": true,
"github_reviewed_at": "2023-01-03T13:36:46Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "### Impact\nI found \"multipart/form-data request tampering vulnerability\" caused by Content-Disposition \"filename\" lack of escaping in httparty.\n\n`httparty/lib/httparty/request` \u003e `body.rb` \u003e `def generate_multipart`\n\nhttps://github.com/jnunemaker/httparty/blob/4416141d37fd71bdba4f37589ec265f55aa446ce/lib/httparty/request/body.rb#L43\n\nBy exploiting this problem, the following attacks are possible\n\n* An attack that rewrites the \"name\" field according to the crafted file name, impersonating (overwriting) another field.\n* Attacks that rewrite the filename extension at the time multipart/form-data is generated by tampering with the filename\n\nFor example, this vulnerability can be exploited to generate the following Content-Disposition.\n\n\u003e Normal Request example:\n\u003e normal input filename: `abc.txt`\n\u003e \n\u003e generated normal header in multipart/form-data\n\u003e `Content-Disposition: form-data; name=\"avatar\"; filename=\"abc.txt\"`\n \n\u003e Malicious Request example\n\u003e malicious input filename: `overwrite_name_field_and_extension.sh\"; name=\"foo\"; dummy=\".txt`\n\u003e \n\u003e generated malicious header in multipart/form-data:\n\u003e `Content-Disposition: form-data; name=\"avatar\"; filename=\"overwrite_name_field_and_extension.sh\"; name=\"foo\"; dummy=\".txt\"`\n\nThe Abused Header has multiple name ( `avatar` \u0026 `foo` ) fields and the \"filename\" has been rewritten from `*.txt` to `*.sh` .\n\nThese problems can result in successful or unsuccessful attacks, depending on the behavior of the parser receiving the request.\nI have confirmed that the attack succeeds, at least in the following frameworks\n\n * Spring (Java)\n * Ktor (Kotlin)\n * Ruby on Rails (Ruby)\n\nThe cause of this problem is the lack of escaping of the `\"` (Double-Quote) character in Content-Disposition \u003e filename.\n\nWhatWG\u0027s HTML spec has an escaping requirement.\n\nhttps://html.spec.whatwg.org/#multipart-form-data\n\n\u003e For field names and filenames for file fields, the result of the encoding in the previous bullet point must be escaped by replacing any 0x0A (LF) bytes with the byte sequence `%0A`, 0x0D (CR) with `%0D` and 0x22 (\") with `%22`. The user agent must not perform any other escapes.\n\n\n\n### Patches\n\nAs noted at the beginning of this section, encoding must be done as described in the HTML Spec.\n\nhttps://html.spec.whatwg.org/#multipart-form-data\n\n\u003e For field names and filenames for file fields, the result of the encoding in the previous bullet point must be escaped by replacing any 0x0A (LF) bytes with the byte sequence `%0A`, 0x0D (CR) with `%0D` and 0x22 (\") with `%22`. The user agent must not perform any other escapes.\n\nTherefore, it is recommended that Content-Disposition be modified by either of the following\n\n\u003e Before:\n\u003e `Content-Disposition: attachment;filename=\"malicious.sh\";dummy=.txt`\n\n\u003e After:\n\u003e `Content-Disposition: attachment;filename=\"%22malicious.sh%22;dummy=.txt\"`\n\nhttps://github.com/jnunemaker/httparty/blob/4416141d37fd71bdba4f37589ec265f55aa446ce/lib/httparty/request/body.rb#L43\n\n```\nfile_name.gsub(\u0027\"\u0027, \u0027%22\u0027)\n```\n\nAlso, as for `\\r`, `\\n`, URL Encode is not done, but it is not newlines, so it seemed to be OK.\nHowever, since there may be omissions, it is safer to URL encode these as well, if possible.\n( `\\r` to `%0A` and `\\d` to `%0D` ) \n\n### PoC\n\n#### PoC Environment\n\nOS: macOS Monterey(12.3)\nRuby ver: ruby 3.1.2p20 \nhttparty ver: 0.20.0\n(Python3 - HTTP Request Logging Server)\n\n### PoC procedure\n\n\n(Linux or MacOS is required. \nThis is because Windows does not allow file names containing `\"` (double-quote) .)\n\n1. Create Project \n```\n$ mkdir my-app\n$ cd my-app\n$ gem install httparty\n```\n\n2. Create malicious file\n\n```\n$ touch \u0027overwrite_name_field_and_extension.sh\"; name=\"foo\"; dummy=\".txt\u0027\n```\n\n3. Generate Vuln code\n\n```\n$ vi example.rb\n```\n\n```\nrequire \u0027httparty\u0027\n\nfilename = \u0027overwrite_name_field_and_extension.sh\"; name=\"foo\"; dummy=\".txt\u0027\n\nHTTParty.post(\u0027http://localhost:12345/\u0027,\n body: {\n name: \u0027Foo Bar\u0027,\n email: \u0027example@email.com\u0027,\n avatar: File.open(filename)\n }\n)\n```\n\n\n4. Run Logging Server\n\nI write Python code, but any method will work as long as you can see the HTTP Request Body.\n(e.g. Debugger, HTTP Logging Server, Packet Capture) \n\n\n$ vi logging.py\n```\nfrom http.server import HTTPServer\nfrom http.server import BaseHTTPRequestHandler\n\nclass LoggingServer(BaseHTTPRequestHandler):\n\n def do_POST(self):\n self.send_response(200)\n self.end_headers()\n self.wfile.write(\"ok\".encode(\"utf-8\"))\n\n content_length = int(self.headers[\u0027Content-Length\u0027])\n post_data = self.rfile.read(content_length)\n print(\"POST request,\\nPath: %s\\nHeaders:\\n%s\\n\\nBody:\\n%s\\n\",\n str(self.path), str(self.headers), post_data.decode(\u0027utf-8\u0027))\n self.wfile.write(\"POST request for {}\".format(self.path).encode(\u0027utf-8\u0027))\n\nip = \u0027127.0.0.1\u0027\nport = 12345\n\nserver = HTTPServer((ip, port), LoggingServer)\nserver.serve_forever()\n```\n\n$ python logging.py\n\n\n5. Run \u0026 Logging server\n\n```\n$ run example.rb\n```\n\nReturn Request Header \u0026 Body:\n\n\u003e User-Agent: Ruby\n\u003e Content-Type: multipart/form-data; boundary=------------------------F857UcxRc2J1zFOz\n\u003e Connection: close\n\u003e Host: localhost:12345\n\u003e Content-Length: 457\n\u003e \n\u003e --------------------------F857UcxRc2J1zFOz\n\u003e Content-Disposition: form-data; name=\"name\"\n\u003e \n\u003e Foo Bar\n\u003e --------------------------F857UcxRc2J1zFOz\n\u003e Content-Disposition: form-data; name=\"email\"\n\u003e \n\u003e example@email.com\n\u003e --------------------------F857UcxRc2J1zFOz\n\u003e Content-Disposition: form-data; name=\"avatar\"; filename=\"overwrite_name_field_and_extension.sh\"; name=\"foo\"; dummy=\".txt\"\n\u003e Content-Type: text/plain\n\u003e \n\u003e abc\n\u003e --------------------------F857UcxRc2J1zFOz--\n\n\nContent-Disposition:\n\u003e Content-Disposition: form-data; name=\"avatar\"; filename=\"overwrite_name_field_and_extension.sh\"; name=\"foo\"; dummy=\".txt\"\n\n* name fields is duplicate (avator \u0026 foo)\n* filename \u0026 extension tampering ( .txt --\u003e .sh )\n\n\n\n\n### References\n\n1. I also include a similar report that I previously reported to Firefox.\nhttps://bugzilla.mozilla.org/show_bug.cgi?id=1556711\n\n\n2. I will post some examples of frameworks that did not have problems as reference.\n\nGolang\nhttps://github.com/golang/go/blob/e0e0c8fe9881bbbfe689ad94ca5dddbb252e4233/src/mime/multipart/writer.go#L144\n\nSpring\nhttps://github.com/spring-projects/spring-framework/blob/4cc91e46b210b4e4e7ed182f93994511391b54ed/spring-web/src/main/java/org/springframework/http/ContentDisposition.java#L259-L267\n\nSymphony\nhttps://github.com/symfony/symfony/blob/123b1651c4a7e219ba59074441badfac65525efe/src/Symfony/Component/Mime/Header/ParameterizedHeader.php#L128-L133\n\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email us at [kumagoro_alice@yahoo.co.jp](mailto:kumagoro_alice@yahoo.co.jp)\n",
"id": "GHSA-5pq7-52mg-hr42",
"modified": "2024-01-05T15:32:51Z",
"published": "2023-01-03T13:36:46Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/jnunemaker/httparty/security/advisories/GHSA-5pq7-52mg-hr42"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-22049"
},
{
"type": "WEB",
"url": "https://github.com/jnunemaker/httparty/commit/cdb45a678c43e44570b4e73f84b1abeb5ec22b8e"
},
{
"type": "PACKAGE",
"url": "https://github.com/jnunemaker/httparty"
},
{
"type": "WEB",
"url": "https://github.com/jnunemaker/httparty/blob/4416141d37fd71bdba4f37589ec265f55aa446ce/lib/httparty/request/body.rb#L43"
},
{
"type": "WEB",
"url": "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/httparty/CVE-2024-22049.yml"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "httparty has multipart/form-data request tampering vulnerability"
}
GHSA-679F-X4G5-488C
Vulnerability from github – Published: 2022-05-24 17:41 – Updated: 2022-05-24 17:41Multiple vulnerabilities in the web-based management interface of Cisco Small Business RV160, RV160W, RV260, RV260P, and RV260W VPN Routers could allow an unauthenticated, remote attacker to execute arbitrary code as the root user on an affected device. These vulnerabilities exist because HTTP requests are not properly validated. An attacker could exploit these vulnerabilities by sending a crafted HTTP request to the web-based management interface of an affected device. A successful exploit could allow the attacker to remotely execute arbitrary code on the device.
{
"affected": [],
"aliases": [
"CVE-2021-1295"
],
"database_specific": {
"cwe_ids": [
"CWE-472"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-02-04T17:15:00Z",
"severity": "CRITICAL"
},
"details": "Multiple vulnerabilities in the web-based management interface of Cisco Small Business RV160, RV160W, RV260, RV260P, and RV260W VPN Routers could allow an unauthenticated, remote attacker to execute arbitrary code as the root user on an affected device. These vulnerabilities exist because HTTP requests are not properly validated. An attacker could exploit these vulnerabilities by sending a crafted HTTP request to the web-based management interface of an affected device. A successful exploit could allow the attacker to remotely execute arbitrary code on the device.",
"id": "GHSA-679f-x4g5-488c",
"modified": "2022-05-24T17:41:01Z",
"published": "2022-05-24T17:41:01Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-1295"
},
{
"type": "WEB",
"url": "https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-rv160-260-rce-XZeFkNHf"
}
],
"schema_version": "1.4.0",
"severity": []
}
Mitigation MIT-5
Strategy: Input Validation
- Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
- When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
- Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
Mitigation MIT-20
Strategy: Input Validation
Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.
CAPEC-146: XML Schema Poisoning
An adversary corrupts or modifies the content of XML schema information passed between a client and server for the purpose of undermining the security of the target. XML Schemas provide the structure and content definitions for XML documents. Schema poisoning is the ability to manipulate a schema either by replacing or modifying it to compromise the programs that process documents that use this schema.
CAPEC-226: Session Credential Falsification through Manipulation
An attacker manipulates an existing credential in order to gain access to a target application. Session credentials allow users to identify themselves to a service after an initial authentication without needing to resend the authentication information (usually a username and password) with every message. An attacker may be able to manipulate a credential sniffed from an existing connection in order to gain access to a target server.
CAPEC-31: Accessing/Intercepting/Modifying HTTP Cookies
This attack relies on the use of HTTP Cookies to store credentials, state information and other critical data on client systems. There are several different forms of this attack. The first form of this attack involves accessing HTTP Cookies to mine for potentially sensitive data contained therein. The second form involves intercepting this data as it is transmitted from client to server. This intercepted information is then used by the adversary to impersonate the remote user/session. The third form is when the cookie's content is modified by the adversary before it is sent back to the server. Here the adversary seeks to convince the target server to operate on this falsified information.
CAPEC-39: Manipulating Opaque Client-based Data Tokens
In circumstances where an application holds important data client-side in tokens (cookies, URLs, data files, and so forth) that data can be manipulated. If client or server-side application components reinterpret that data as authentication tokens or data (such as store item pricing or wallet information) then even opaquely manipulating that data may bear fruit for an Attacker. In this pattern an attacker undermines the assumption that client side tokens have been adequately protected from tampering through use of encryption or obfuscation.