Skip to content

Eclipse Jetty's cookie parsing of quoted values can exfiltrate values from other cookies

Low severity GitHub Reviewed Published Apr 18, 2023 in jetty/jetty.project • Updated Nov 6, 2023

Package

maven org.eclipse.jetty:jetty-server (Maven)

Affected versions

>= 10.0.0, < 10.0.14
>= 11.0.0, < 11.0.14
>= 12.0.0alpha0, < 12.0.0.beta0
< 9.4.51.v20230217

Patched versions

10.0.14
11.0.14
12.0.0.beta0
9.4.51.v20230217

Description

Nonstandard cookie parsing in Jetty may allow an attacker to smuggle cookies within other cookies, or otherwise perform unintended behavior by tampering with the cookie parsing mechanism.

If Jetty sees a cookie VALUE that starts with " (double quote), it will continue to read the cookie string until it sees a closing quote -- even if a semicolon is encountered.

So, a cookie header such as:

DISPLAY_LANGUAGE="b; JSESSIONID=1337; c=d" will be parsed as one cookie, with the name DISPLAY_LANGUAGE and a value of b; JSESSIONID=1337; c=d

instead of 3 separate cookies.

Impact

This has security implications because if, say, JSESSIONID is an HttpOnly cookie, and the DISPLAY_LANGUAGE cookie value is rendered on the page, an attacker can smuggle the JSESSIONID cookie into the DISPLAY_LANGUAGE cookie and thereby exfiltrate it. This is significant when an intermediary is enacting some policy based on cookies, so a smuggled cookie can bypass that policy yet still be seen by the Jetty server.

Patches

  • 9.4.51.v20230217 - via PR #9352
  • 10.0.15 - via PR #9339
  • 11.0.15 - via PR #9339

Workarounds

No workarounds

References

References

@jmcc0nn3ll jmcc0nn3ll published to jetty/jetty.project Apr 18, 2023
Published by the National Vulnerability Database Apr 18, 2023
Published to the GitHub Advisory Database Apr 18, 2023
Reviewed Apr 18, 2023
Last updated Nov 6, 2023

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
High
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:L/I:N/A:N

EPSS score

0.113%
(46th percentile)

Weaknesses

CVE ID

CVE-2023-26049

GHSA ID

GHSA-p26g-97m4-6q7c

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.