<Vulnerability name="CVE-2026-40973">
    <DocumentDistribution xml:lang="en">Copyright © 2012 Red Hat, Inc. All rights reserved.</DocumentDistribution>
    <ThreatSeverity>Moderate</ThreatSeverity>
    <PublicDate>2026-04-27T23:29:51</PublicDate>
    <Bugzilla id="2463330" url="https://bugzilla.redhat.com/show_bug.cgi?id=2463330" xml:lang="en:us">
Spring Boot: Spring Boot: Arbitrary Code Execution and Session Hijacking via predictable temporary directory
    </Bugzilla>
    <CVSS3 status="draft">
        <CVSS3BaseScore>7.0</CVSS3BaseScore>
        <CVSS3ScoringVector>CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H</CVSS3ScoringVector>
    </CVSS3>
    <CWE>CWE-341</CWE>
    <Details xml:lang="en:us" source="Red Hat">
A flaw was found in Spring Boot. A local attacker on the same host as the application may be able to take control of the `ApplicationTemp` directory due to predictable temporary directory handling. When the `server.servlet.session.persistent` setting is enabled and the attack persists across application restarts, this could allow the attacker to read session information, hijack authenticated user sessions, or execute arbitrary code as the application's user.
    </Details>
    <Mitigation xml:lang="en:us">
To mitigate this issue, ensure that the `server.servlet.session.persistent` property is set to `false` in your Spring Boot application's configuration. This prevents session information from being written to the predictable temporary directory, thereby removing the conditions necessary for exploitation. Disabling persistent sessions may affect application behavior that relies on session data surviving restarts.
    </Mitigation>
    <PackageState cpe="cpe:/a:redhat:amq_broker:7">
        <ProductName>Red Hat AMQ Broker 7</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>spring-boot</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:amq_clients:2023">
        <ProductName>Red Hat AMQ Clients</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>spring-boot</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:camel_spring_boot:4">
        <ProductName>Red Hat build of Apache Camel for Spring Boot 4</ProductName>
        <FixState>Affected</FixState>
        <PackageName>spring-boot</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:apache_camel_hawtio:4">
        <ProductName>Red Hat build of Apache Camel - HawtIO 4</ProductName>
        <FixState>Affected</FixState>
        <PackageName>spring-boot</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:optaplanner:::el6">
        <ProductName>Red Hat build of OptaPlanner 8</ProductName>
        <FixState>Affected</FixState>
        <PackageName>spring-boot</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:jboss_data_grid:8">
        <ProductName>Red Hat Data Grid 8</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>spring-boot</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:8">
        <ProductName>Red Hat Enterprise Linux 8</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>log4j:2/log4j</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:9">
        <ProductName>Red Hat Enterprise Linux 9</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>log4j</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:jboss_fuse:7">
        <ProductName>Red Hat Fuse 7</ProductName>
        <FixState>Affected</FixState>
        <PackageName>spring-boot</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:jboss_enterprise_application_platform:7">
        <ProductName>Red Hat JBoss Enterprise Application Platform 7</ProductName>
        <FixState>Affected</FixState>
        <PackageName>spring-boot</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:jboss_enterprise_application_platform:8">
        <ProductName>Red Hat JBoss Enterprise Application Platform 8</ProductName>
        <FixState>Affected</FixState>
        <PackageName>spring-boot</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:jbosseapxp">
        <ProductName>Red Hat JBoss Enterprise Application Platform Expansion Pack</ProductName>
        <FixState>Affected</FixState>
        <PackageName>spring-boot</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:openshift_devspaces:3">
        <ProductName>Red Hat OpenShift Dev Spaces</ProductName>
        <FixState>Affected</FixState>
        <PackageName>devspaces/openvsx-rhel9</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:openshift_devspaces:3">
        <ProductName>Red Hat OpenShift Dev Spaces</ProductName>
        <FixState>Affected</FixState>
        <PackageName>devspaces/pluginregistry-rhel9</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:jboss_enterprise_bpms_platform:7">
        <ProductName>Red Hat Process Automation 7</ProductName>
        <FixState>Affected</FixState>
        <PackageName>spring-boot</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:red_hat_single_sign_on:7">
        <ProductName>Red Hat Single Sign-On 7</ProductName>
        <FixState>Affected</FixState>
        <PackageName>spring-boot</PackageName>
    </PackageState>
    <References xml:lang="en:us">
https://www.cve.org/CVERecord?id=CVE-2026-40973
https://nvd.nist.gov/vuln/detail/CVE-2026-40973
https://spring.io/security/cve-2026-40973
    </References>
</Vulnerability>