CVE-2026-59407

Information Exposure
Affects
Spring Boot
in
Spring
No items found.
Versions
>=4.1.0 <=4.1.2, >=4.0.0 <=4.0.9, >=3.5.0 <=3.5.17, >=3.0.0 <=3.4.18, <=2.7.35

Patch Available.

Exclamation circle icon
Patch Available

This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.

Overview

Spring Boot is an open-source Java framework from the Spring portfolio for building stand-alone, production-grade Spring applications with auto-configuration, embedded servers and build tooling, including Maven and Gradle plugins that package an application as an OCI container image using Cloud Native Buildpacks.

An information exposure vulnerability (CVE-2026-59407) has been identified in the Spring Boot Buildpacks image building support, which allows other local users to read image layer content. When a container image is built on a POSIX platform using Buildpacks, layers larger than approximately 4KB are written to a temporary file that other users on the same machine can read.

Per OWASP: Access control enforces policy such that users cannot act outside of their intended permissions. Failures typically lead to unauthorized information disclosure, modification, or destruction of all data or performing a business function outside the user's limits.

This issue affects multiple versions of Spring Boot.

Details

Module Info

Vulnerability Info

This Medium-severity vulnerability is found in the org.springframework.boot:spring-boot-buildpack-platform package in multiple versions of Spring Boot. The package backs the build-image goal of the Spring Boot Maven plugin and the bootBuildImage task of the Spring Boot Gradle plugin, which assemble container image layers and send them to Docker.

Layer content passes through InspectedContent, which buffers the bytes so they can be inspected (for example, to compute a digest) and written more than once. Its internal InspectingOutputStream keeps the content in memory until the total size exceeds MEMORY_LIMIT, then moves it to a temporary file:

static final int MEMORY_LIMIT = 4 * 1024 + 3;

private void convertToTempFile() throws IOException {
	this.tempFile = File.createTempFile("buildpack", ".tmp");
	byte[] bytes = ((ByteArrayOutputStream) this.delegate).toByteArray();
	this.delegate = new FileOutputStream(this.tempFile);
	StreamUtils.copy(bytes, this.delegate);
}

File.createTempFile creates the file in the shared system temporary directory (java.io.tmpdir, typically /tmp) with the default permissions given by the process umask, which on most POSIX systems makes it readable by every local user. Any layer over roughly 4KB that the plugin assembles for the ephemeral builder image it sends to Docker, such as the layer holding the build's configured environment variables or the layers of buildpacks added to the builder, is therefore copied in full to a file that another user on the build machine (for example, a shared CI runner or developer host) can read.

Mitigation

Only recent versions of Spring Boot receive community support. Older lines are End-of-Life and will not receive public updates to address this issue.

Builds that cannot upgrade immediately can work around this issue by configuring the JVM that runs the build with a temporary directory that only the current user can access, for example by setting java.io.tmpdir to a directory with 700 permissions.

Users of the affected components should apply one of the following mitigations:

  • Upgrade to a currently supported version of Spring Boot.
  • Leverage a commercial support partner like HeroDevs for post-EOL security support.
Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Medium
ID
CVE-2026-59407
PROJECT Affected
Spring Boot
Versions Affected
>=4.1.0 <=4.1.2, >=4.0.0 <=4.0.9, >=3.5.0 <=3.5.17, >=3.0.0 <=3.4.18, <=2.7.35
NES Versions Affected
Published date
November 20, 2026
≈ Fix date
Category
Information Exposure
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
NES for Spring
Rss feed icon
Subscribe via RSS
or

By submitting the form I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.