Cross-Domain Cookie Injection in WebClientSession in Eclipse Vert.x Web Client
# CVE Reservation Request
<!--
There's help in the Eclipse Foundation Project Handbook https://www.eclipse.org/projects/handbook/#vulnerability-cve
Note that this issue is configured (see the quick actions at the bottom) to be created as confidential.
Note that a vulnerability does not need to actually be resolved before it is reported and that these reports can be revised as needed (reopen the issue to request changes).
If you do not know how to fill certain fields, mark that in the comment and we will help you.
You can delete the comments (or not).
-->
The Eclipse Foundation is a [Common Vulnerabilities and Exposures](https://cve.mitre.org/) (CVE) Numbering Authority.
Creating this ticket initiates **reservation** of a CVE ID for the documented vulnerability. The reserved CVE ID will be posted in a comment below, and kept **confidential** until explicit publication request.
> [!note]
> To request CVE *publication*, please open a [CVE publication](https://gitlab.eclipse.org/security/cve-assignment/-/issues/new?issuable_template=CVE%20Publication%20Request) ticket.
Please fill in the fields below to draft the CVE record.
---
<!--
Required. Specify the project's name (e.g., "Eclipse Dash") and Eclipse Foundation ID, e.g., "technology.dash".
-->
## CVE record information
**Project name:** Eclipse Vert.x
**Project id:** rt.vertx
<!--
Required (for publication). Specify the version range as precisely as possible, e.g., "[3.0, 3.5.1]" or "[3.0, 3.5.1)". Note that using the standard range notion, square brackets are inclusive (i.e., that version is included in the range), and round brakets are exclusive (the vulnerability affects all versions up to but not including the named version).
Multiple ranges can be provided.
-->
**Versions affected:** 5.1.4 and below, 4.5.29 and below
Note that 4.5.29 is not published yet, it will be published today or tomorrow, without the fix.
<!--
Required (for publication). The Common Weakness Enumeration (CWE) code comes from here: https://cwe.mitre.org/, e.g., "CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')". Multiple codes can be provided.
-->
**Common Weakness Enumeration (CWE):**
- [CWE-346: Origin Validation Error](https://cwe.mitre.org/data/definitions/346.html)
<!--
Optional. The Common Attack Pattern Enumerations and Classifications (CAPEC) code comes from here: https://capec.mitre.org/, e.g., "CAPEC-63: Cross-Site Scripting (XSS)". Multiple codes can be provided.
-->
**Common Attack Pattern Enumerations and Classifications (CAPEC):**
- [CAPEC-61: Session Fixation](https://capec.mitre.org/data/definitions/61.html)
<!--
Optional. Provide a Common Vulnerability Scoring System (CVSS). Note that if you do not provide this, then some agencies (e.g. NIST) will compute it on the project's behalf. Please be sure to include the CVSS version number, e.g., "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H".
There's help here: https://www.first.org/cvss/calculator/4.0
-->
**Common Vulnerability Scoring System:** {[cvss](https://www.first.org/cvss/calculator/4.0)}
- CVSS v3.1: **7.5 High** [`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`](https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N&version=3.1)
- CVSS v4.0: **8.2 High** [`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N`](https://www.first.org/cvss/calculator/4.0#CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N)
<!--
Required (for publication). The summary should start with the name of the project, e.g., "Eclipse Vert.x", then a description of the affected versions, followed by a description of the problem. The summary should be concise. For example,
"In Eclipse Vert.x version 3.0 to 3.5.1, the HttpServer response
headers and HttpClient request headers do not filter carriage return and
line feed characters from the header value. This allow unfiltered values
to inject a new header in the client request or server response."
-->
**Summary:**
In versions up to and including 4.5.29 (4.x branch) and 5.1.4 (5.x branch), the `WebClientSession` component of Eclipse Vert.x Web Client does not validate that the `Domain` attribute of a `Set-Cookie` response header matches the originating server's domain, in violation of RFC 6265 section 5.3.
An attacker who controls any server that the victim application contacts can inject a cookie scoped to an arbitrary third-party domain; because the session store performs no cross-domain ownership check, it stores and later transmits that cookie to the targeted domain.
When the victim application subsequently sends a request to the targeted domain using the same `WebClientSession`, it presents the attacker-injected cookie, causing the receiving service to process the request under the attacker's account. Sensitive data included in the victim application's requests, such as payment amounts, card details, or other API payloads, may then be accessible to the attacker through their own account on that service.
<!--
Required (for publication). Include a link to the issue (e.g., GitHub Security Advisory) that's being used to track/resolve the issue. Other links that provide more information can be provided. For example, you may later publish the link to the fix commit.
-->
**Links:**
- https://github.com/vert-x3/vertx-web-ghsa-jwpr-55qp-7mm8
We plan to release the fixed version early next week.
<!--
Optional. Add the name or pseudonym of the person who has reported the issue.
-->
**Credits:** Julien Viet
<!-- Quick actions will configure the state of the issue. Leave these. -->
<!-- Keep this as the last line -->
issue