Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAttacker operates or compromises third-party HTTP server
-
DeliveryVictim PHP app contacts attacker server using shared CookieJar
-
ExploitServer responds with Set-Cookie using dot-only Domain attribute
-
InstallGuzzle normalizes domain to empty string, bypasses validate(), stores cookie
-
C2App makes subsequent request to trusted downstream service
-
ExecuteInjected cookie sent to trusted host
-
ImpactSession fixation or unauthorized cookie injection achieved
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Origin validation
|
| Exploitation Conditions | Exploitation requires three concurrent conditions: (1) the application uses Guzzle's cookie support, either via new Client(['cookies' => true]) or by passing an explicit CookieJar instance to the client constructor; (2) the same CookieJar instance is reused across HTTP requests to both an attacker-reachable origin (a server the attacker controls or can respond from) and at least one trusted origin that will accept the injected cookie; (3) the attacker-controlled server issues a Set-Cookie header with a dot-only Domain attribute such as Domain=., Domain=.., or a whitespace-padded variant like Domain= . . Applications that do not use Guzzle cookie support, use separate jars per origin, or restrict Guzzle to a single trusted host per client instance are not affected. The CVSS PR:N metric confirms no attacker privilege on the vulnerable system is required - the attacker's leverage comes from operating the malicious server being contacted, not from any foothold on the PHP application itself. |
| Impact | The NVD-assigned CVSS 5.8 (AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N) reflects a network-reachable, low-complexity attack with scope change into downstream systems, producing limited integrity impact via cookie injection. The Scope:Changed designation is accurate and important - the vulnerable Guzzle client becomes a conduit that injects attacker-supplied cookies into requests to entirely separate, trusted services. No EPSS score was supplied in the input; the absence of KEV listing and POC suggests this has not been observed in broad exploitation at time of analysis. However, the exploitable pattern - a shared CookieJar contacting mixed-trust origins - is common in PHP microservice backends and API aggregators, so the realistic exposure is broader than a low CVSS might suggest. The key limiting factor is architectural: applications using separate jars per origin or not using Guzzle cookie support at all are fully unaffected. The attack complexity is low from the attacker's perspective once the application is in the vulnerable configuration, though triggering the condition requires the attacker to operate or compromise a server that the target application requests. |
| Exploit ScenarioDerived | A PHP application aggregates data from multiple third-party REST APIs using a single Guzzle client configured with new Client(['cookies' => true]). An attacker who controls one of those third-party endpoints - or who can compromise or spoof one - responds with Set-Cookie: authtoken=attacker_value; Domain=. in an HTTP response. Guzzle stores this cookie with an empty normalized domain and subsequently includes it in every outgoing request from the same jar, including requests to the application's own internal authentication service, injecting the attacker-controlled authtoken and potentially achieving session fixation. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 19, 2026
Cookie domain validation in guzzlehttp/guzzle before 7.12.1 allows cross-origin cookie injection when a shared CookieJar contacts both attacker-controlled and trusted hosts. The flaw stems from SetCookie::matchesDomain() normalizing dot-only Domain values (e.g., 'Domain=.', 'Domain=..') to an empty string, while SetCookie::validate() only rejected strictly empty domains - meaning normalized-empty domains were stored and silently treated as matching every request host. Any application using new Client(['cookies' => true]) or an explicit shared CookieJar that requests data from an attacker-reachable origin is exposed to session fixation or cookie injection against unrelated downstream services. No public exploit or CISA KEV listing has been identified at time of analysis.
RemediationAI
The primary fix is to upgrade guzzlehttp/guzzle to version 7.12.1 or later via Composer (composer require guzzlehttp/guzzle:^7.12.1); this release both rejects dot-only Domain attributes at ingestion time and prevents an empty normalized domain from matching any host. Vendor advisory: https://github.com/guzzle/guzzle/security/advisories/GHSA-cwxw-98qj-8qjx. If an immediate upgrade is not possible, the most effective workaround is to eliminate shared CookieJar instances that span trust boundaries: replace new Client(['cookies' => true]) - which creates one shared jar for the client's lifetime - with per-request or per-origin jars instantiated explicitly, so cookies from untrusted origins are never presented to trusted ones. Alternatively, disable cookie handling entirely for any Guzzle client that contacts untrusted external hosts. Note that these workarounds require code changes and may break existing cookie-relay or session-forwarding logic that relies on the shared jar behavior.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in composer, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Guzzle (pkg:composer/guzzlehttp/guzzle) is a widely used PHP HTTP client library. The vulnerability resides in two cooperating methods within the SetCookie class: matchesDomain() strips leading dots as part of RFC normalization, which collapses pathological values like '.' or '...' to the empty string '', and validate() only rejects the domain if it was originally empty - never if it became empty after normalization. This is a textbook CWE-346 (Origin Validation Error): the trust boundary between cookie domains and request hosts is broken because the normalization step is applied before the validation guard, creating a bypass. The affected component is the CookieJar subsystem, which is opt-in but enabled by the common idiom new Client(['cookies' => true]). Applications that share one CookieJar across requests to multiple origins - including untrusted third-party APIs - inherit the risk. The flaw is unrelated to Public Suffix List (PSL) validation; dot-only strings contain no domain label at all and should be unconditionally rejected.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N
Network-delivered attack with no credentials required; scope changes as injected cookies transit to downstream trusted services; integrity impact is limited (cookie injection only, no direct data modification).
Primary rating from Vendor (https://github.com/guzzle/guzzle).
CVSS VectorVendor: https://github.com/guzzle/guzzle
DescriptionCVE.org
Impact
CookieJar incorrectly accepts cookies with a dot-only Domain attribute, such as Domain=., Domain=.., Domain=..., and whitespace-padded variants such as Domain= . . In affected versions, SetCookie::matchesDomain() removes leading dots from the cookie domain, normalizing dot-only values to the empty string; SetCookie::validate() only rejected a strictly empty domain, so these cookies could be stored and the empty normalized domain was treated as matching any request host.
An attacker-controlled origin that an application requests with a shared cookie jar can therefore set a cookie that Guzzle later sends to unrelated hosts using the same jar. This may allow cookie injection or session fixation against downstream services, depending on how those services interpret the injected cookie. Applications are affected when they use Guzzle's cookie support, for example new Client(['cookies' => true]) or an explicit shared CookieJar, and reuse the same jar across attacker-controlled and trusted origins.
Applications that do not use Guzzle's cookie support, or that use separate cookie jars per origin or trust boundary, are not affected. This issue is distinct from public suffix list validation: dot-only domains contain no domain label and should not match unrelated hosts.
Patches
The issue is patched in 7.12.1 and later. Starting in that release, Guzzle rejects dot-only cookie Domain attributes and prevents an empty normalized cookie domain from matching any request host.
Workarounds
If you cannot upgrade immediately, do not reuse the same CookieJar instance across untrusted and trusted origins. Use separate cookie jars per origin or trust boundary, or disable cookie handling for requests to untrusted hosts.
Avoid using new Client(['cookies' => true]) for clients that may contact unrelated hosts with different trust levels, because that option creates one shared jar for the client.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
EUVD-2026-38457
GHSA-cwxw-98qj-8qjx
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB