CVE-2023-28708: Apache Tomcat: JSESSIONID Cookie missing secure attribute in some configurations
Apache Tomcat information disclosure CVE-2023-28708
When using the RemoteIpFilter with requests received from a reverse proxy via HTTP that include the X-Forwarded-Proto header set to https, session cookies created by Tomcat did not include the secure attribute. This could result in the user agent transmitting the session cookie over an insecure channel.
Affects: 8.5.0 to 8.5.85
https://tomcat.apache.org/security-8.html#FixedinApacheTomcat8.5.86 https://bz.apache.org/bugzilla/showbug.cgi?id=66471 https://github.com/apache/tomcat/commit/5b72c94e8b2c4ada63a1d91dc527bf4d8fd1f510
Other sources
When using the RemoteIpFilter with requests received from a reverse proxy via HTTP that include the X-Forwarded-Proto header set to https, session cookies created by Apache Tomcat 11.0.0-M1 to 11.0.0.-M2, 10.1.0-M1 to 10.1.5, 9.0.0-M1 to 9.0.71 and 8.5.0 to 8.5.85 did not include the secure attribute. This could result in the user agent transmitting the session cookie over an insecure channel.
Older, EOL versions may also be affected.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/tomcatto a version that resolves this vulnerability.Fixed in 8.5.86 - Upgrade
Upgrade
redhat/tomcatto a version that resolves this vulnerability.Fixed in 9.0.72 - Upgrade
Upgrade
redhat/tomcatto a version that resolves this vulnerability.Fixed in 10.1.6 - Upgrade
Upgrade
redhat/tomcatto a version that resolves this vulnerability.Fixed in 11.0.0 - Upgrade
Upgrade
Apache Tomcatto a version that resolves this vulnerability.Fixed in 8.5.86 - Configuration
Ensure the reverse proxy sets the X-Forwarded-Proto header to https when using RemoteIpFilter with Tomcat so session cookies are treated as secure (this issue affected RemoteIpFilter scenarios where X-Forwarded-Proto=https over HTTP requests led to missing the Secure attribute).
Apache Tomcat RemoteIpFilter X-Forwarded-Proto = https
Event History
Frequently Asked Questions
What is the CVE ID of this vulnerability?
CVE-2023-28708
What is the severity of CVE-2023-28708?
The severity of CVE-2023-28708 is high with a score of 7.5.
How does this vulnerability occur?
This vulnerability occurs when using the RemoteIpFilter with requests received from a reverse proxy via HTTP that include the X-Forwarded-Proto header set to https.
Which versions of Apache Tomcat are affected by this vulnerability?
Apache Tomcat versions 8.5.0 to 8.5.85, 9.0.0-M1 to 9.0.71, 10.1.0-M1 to 10.1.5, and 11.0.0-M1 to 11.0.0.-M2 are affected by this vulnerability.
How can I fix CVE-2023-28708?
To fix CVE-2023-28708, update Apache Tomcat to version 8.5.86, 9.0.72, 10.1.6, or 11.0.0 or later.