Description
CakePHP through 5.4.3 contains an improper cookie domain validation vulnerability in the Http Client CookieCollection that allows malicious servers to receive and plant cookies by abusing unanchored suffix matching. Attackers controlling a host such as one ending in a victim domain suffix, or sending Set-Cookie Domain values for unrelated hosts, can steal session cookies or inject cookies into shared client cookie jars.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| cakephp | cakephp | ≤ 5.4.3 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 22.04 LTS | cakephp | No fix yet | — |
| Ubuntu 20.04 LTS | cakephp | No fix yet | — |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 16.04 LTS | cakephp | No fix yet | — |
References
- https://github.com/cakephp/cakephp/commit/01753266738606bc0e48e61e44a6e252f11386f9 patch
- https://github.com/cakephp/cakephp/commit/5d9d01a91f0e678d857a94115de12c3e02f3fbba patch
- https://github.com/cakephp/cakephp/commit/bbba5ed06d5cea7e78333b01e65557cff7a28306 patch
- https://github.com/cakephp/cakephp/commit/819b45cbcc5ba864568cb57f62e4fde650b41161 patch
- https://github.com/cakephp/cakephp/pull/19702 patch issue-tracking
- https://github.com/cakephp/cakephp/blob/6f3dd91371ac0698b64024ddb21d57def9fbba91/src/Http/Cookie/CookieCollection.php#L315 technical-description
- https://github.com/cakephp/cakephp/blob/6f3dd91371ac0698b64024ddb21d57def9fbba91/src/Http/Cookie/CookieCollection.php#L74 technical-description
- https://abraxaslabs.tech/research/cakephp-cookie-suffix third-party-advisory
- https://github.com/cakephp/cakephp product
- VulnCheck Advisory: CakePHP through 5.4.3 Cookie Leakage via HTTP Client CookieCollection Domain Matching third-party-advisory