CVE-2023-26049
Eclipse Jetty's cookie parsing of quoted values can exfiltrate values from other cookies
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
- https://www.rfc-editor.org/rfc/rfc2965
- https://www.rfc-editor.org/rfc/rfc6265
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.eclipse.jetty » jetty-server | < 9.4.51.v20230217>= 10.0.0, < 10.0.14>= 11.0.0, < 11.0.14>= 12.0.0alpha0, < 12.0.0.beta0 | 9.4.51.v20230217, 10.0.14, 11.0.14, 12.0.0.beta0 |
Blast radius
60% of the dependent artifacts (12,859) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 135,155 |
| 2 hops | 374,968 |
| 3 hops | 338,015 |
| 4 hops | 181,450 |
| 5 hops | 135,977 |
| 6 hops | 71,625 |
Most used dependents
- org.apache.maven.plugins » maven-site-plugin9,107 usages
- org.apache.hadoop » hadoop-common3,482 usages
- org.apache.spark » spark-sql3,174 usages
- org.apache.kafka » kafka-clients3,135 usages
- org.eclipse.jetty » jetty-servlet2,979 usages
- org.apache.spark » spark-core2,899 usages
- org.eclipse.jetty » jetty-webapp2,060 usages
- com.github.tomakehurst » wiremock1,838 usages
- org.apache.hadoop » hadoop-client1,796 usages
- org.apache.kafka » kafka1,450 usages
- org.jenkins-ci.tools » maven-hpi-plugin1,404 usages
- org.apache.hadoop » hadoop-hdfs1,377 usages
- org.apache.hadoop » hadoop-mapreduce-client-core1,366 usages
- org.eclipse.jetty » jetty-maven-plugin1,337 usages
- org.liquibase » liquibase-core1,306 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
- Webhttps://github.com/eclipse/jetty.project/security/advisories/GHSA-p26g-97m4-6q7c
- Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2023-26049
- Webhttps://github.com/eclipse/jetty.project/pull/9339
- Webhttps://github.com/eclipse/jetty.project/pull/9352
- Packagehttps://github.com/eclipse/jetty.project
- Webhttps://github.com/eclipse/jetty.project/releases/tag/jetty-9.4.51.v20230217
- Webhttps://lists.debian.org/debian-lts-announce/2023/09/msg00039.html
- Webhttps://security.netapp.com/advisory/ntap-20230526-0001
- Webhttps://www.debian.org/security/2023/dsa-5507
- Webhttps://www.rfc-editor.org/rfc/rfc2965
- Webhttps://www.rfc-editor.org/rfc/rfc6265
