CVE-2026-59382
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Spring Integration is the Spring portfolio project that brings the Enterprise Integration Patterns to Spring applications. It provides a lightweight messaging framework of channels, endpoints, transformers and routers, together with channel adapters for protocols and technologies such as files, FTP, HTTP, JDBC, JMS, AMQP, SMB and ZeroMQ.
A Path Traversal vulnerability (CVE-2026-59382) has been identified in AbstractZipTransformer, the base class of the Zip and UnZip transformers, which allows an unprivileged local user to redirect the files the transformers write into a directory of their choosing, under the identity of the application, even though the transformers reject a symbolic link as their work directory.
Per OWASP: Creating and using insecure temporary files can leave application and system data vulnerable to attacks.
This issue affects the Zip transformers of Spring Integration.
Details
Module Info
- Product: Spring Integration
- Affected packages:
org.springframework.integration:spring-integration-zip - Affected versions: >=7.1.0 <=7.1.2, >=7.0.0 <=7.0.7, >=6.5.0 <=6.5.11, >=6.4.0 <=6.4.13
- GitHub repository: https://github.com/spring-projects/spring-integration
- Published packages: https://central.sonatype.com/artifact/org.springframework.integration/spring-integration-zip
- Package manager: Maven
- Fixed in:
- OSS Spring Integration 7.0.8, 7.1.3
- NES for Spring Integration v6.2.21, v6.3.16, v6.4.15, v6.5.12
Vulnerability Info
This Medium-severity vulnerability is found in the org.springframework.integration:spring-integration-zip package in the Zip transformer support of Spring Integration.
AbstractZipTransformer defaults its work directory to a fixed, well-known path in the shared system temporary directory, and resolves that path to its canonical form when the transformer is constructed. Its initialization callback then rejects the work directory if it is a symbolic link:
protected File workDirectory = getDefaultWorkDirectory();
private static File getDefaultWorkDirectory() {
try {
return new File(System.getProperty("java.io.tmpdir"), "ziptransformer").getCanonicalFile();
}
catch (IOException e) {
throw new UncheckedIOException(e);
}
}
@Override
protected void onInit() {
super.onInit();
Path workDirectoryPath = this.workDirectory.toPath();
Assert.isTrue(!Files.isSymbolicLink(workDirectoryPath),
() -> "The 'workDirectory' [" + this.workDirectory + "] must not be a symbolic link.");
if (!this.workDirectory.exists()) {
logger.info(() -> "Creating work directory: " + this.workDirectory);
Assert.isTrue(this.workDirectory.mkdirs(), () -> "Can't create the 'workDirectory': " + this.workDirectory);
}
}getCanonicalFile() follows symbolic links, so if a local user creates ${java.io.tmpdir}/ziptransformer as a link to a directory of their choice before the application starts, the default work directory is already the link's target by the time onInit() runs. The symbolic link check inspects the target rather than the link and passes, and every result the ZipTransformer and UnZipTransformer produce is written into the attacker's directory, owned by the application's user. No application configuration is needed: relying on the default work directory is enough. Versions without the symbolic link check, such as Spring Integration 6.4.10 and 6.5.10, follow a link planted at the same path in the same way.
Mitigation
Only recent versions of Spring Integration receive community support. Older lines are End-of-Life and will not receive public updates to address this issue.
Users of the affected components should apply one of the following mitigations:
- Upgrade to a currently supported version of Spring Integration.
- Configure the work directory of the Zip transformers explicitly, with setWorkDirectory() on ZipTransformer and UnZipTransformer or the work-directory XML attribute, pointing it at an existing directory that the application owns and that no other local user can create or write to, rather than leaving it in the shared system temporary directory.
- Leverage a commercial support partner like HeroDevs for post-EOL security support.
Credits
Scott Frederick from HeroDevs (finder)