CVE-2026-59441

Incorrectly Configured Access Control
Affects
Spring Cloud Stream
in
Spring
No items found.
Versions
>=4.0.0 <=4.2.3, >=4.3.0 <=4.3.3, >=5.0.0 <=5.0.4

Patch Available.

Exclamation circle icon
Patch Available

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

Overview

Spring Cloud Stream is a framework for building highly scalable event-driven microservices connected with shared messaging systems. It provides a programming model built on familiar Spring idioms and connects applications to brokers such as Apache Kafka and RabbitMQ through binder implementations.

An incorrectly configured access control vulnerability (CVE-2026-59441) has been identified in the Kafka binder of Spring Cloud Stream, which allows attackers to have inbound Kafka header values deserialized into classes that sit in subpackages of the trusted packages, rather than only in the trusted packages themselves.

Per OWASP: Data which is untrusted cannot be trusted to be well formed. Malformed data or unexpected data could be used to abuse application logic, deny service, or execute arbitrary code, when deserialized.

This issue affects multiple versions of Spring Cloud Stream.

Details

Module Info

Vulnerability Info

This Low-severity vulnerability is found in the org.springframework.cloud:spring-cloud-stream-binder-kafka package in multiple versions of Spring Cloud Stream.

When the Kafka binder maps inbound record headers to message headers, BinderHeaderMapper.toHeaders() reads the spring_json_header_types header, a JSON map from header name to Java class name that is supplied by whoever produced the record. For each listed header, the mapper asks trusted(requestedType) whether the class may be used. If it may, the class is loaded with ClassUtils.forName() and the header bytes are deserialized into it with Jackson's ObjectMapper.readValue(). Otherwise the raw value is wrapped in a NonTrustedHeaderType.

The trust decision is meant to be limited to an allow-list of packages, which by default includes java.lang and java.util and which applications can extend with addTrustedPackages(). The check, however, accepts any subpackage of a trusted package as well:

protected boolean trusted(String requestedType) {
    if (requestedType.equals(NonTrustedHeaderType.class.getName())) {
        return true;
    }
    if (!this.trustedPackages.isEmpty()) {
        int lastDot = requestedType.lastIndexOf('.');
        if (lastDot < 0) {
            return false;
        }
        String packageName = requestedType.substring(0, lastDot);
        for (String trustedPackage : this.trustedPackages) {
            if (packageName.equals(trustedPackage) || packageName.startsWith(trustedPackage + ".")) {
                return true;
            }
        }
        return false;
    }
    return true;
}

Because of the startsWith(trustedPackage + ".") branch, trusting java.lang or java.util also trusts every class under java.lang.* and java.util.* subpackages, and trusting an application package such as com.example also trusts everything beneath it. A producer that can write records to a topic the application consumes can therefore name such a class in spring_json_header_types and have the binder instantiate and populate it from attacker-controlled JSON, a set of types far wider than the operator configured. The same check is applied again when an upstream NonTrustedHeaderType is re-evaluated, so the bypass also applies to headers forwarded between applications. From 4.2.1 on, the method lives in org.springframework.cloud.stream.binder.kafka.common.BinderHeaderMapper in the spring-cloud-stream-binder-kafka-core module, which spring-cloud-stream-binder-kafka depends on, and the org.springframework.cloud.stream.binder.kafka.BinderHeaderMapper class left in spring-cloud-stream-binder-kafka is a deprecated subclass of it; in 4.2.0 and earlier the method is in org.springframework.cloud.stream.binder.kafka.BinderHeaderMapper in spring-cloud-stream-binder-kafka itself.

Mitigation

Only recent versions of Spring Cloud Stream 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 Cloud Stream.
  • Leverage a commercial support partner like HeroDevs for post-EOL security support.

Credits

  • Yu Bao from PayPal Cyber Security Team (finder)
Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Low
ID
CVE-2026-59441
PROJECT Affected
Spring Cloud Stream
Versions Affected
>=4.0.0 <=4.2.3, >=4.3.0 <=4.3.3, >=5.0.0 <=5.0.4
NES Versions Affected
Published date
November 20, 2026
≈ Fix date
Category
Incorrectly Configured Access Control
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.