CVE-2026-59434

Remote Code Execution
Affects
Spring Cloud Kubernetes
in
Spring
No items found.
Versions
>=3.1.0 <=3.2.4, >=3.3.0 <=3.3.4, >=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 Kubernetes provides implementations of well known Spring Cloud interfaces, such as externalized configuration and service discovery, that allow developers to build and run Spring Cloud applications on Kubernetes. Its configuration support loads application properties from Kubernetes ConfigMaps and Secrets.

A remote code execution vulnerability (CVE-2026-59434) has been identified in the ConfigMap and Secret property source support of Spring Cloud Kubernetes, which allows attackers who can write to a ConfigMap or Secret that the application reads to make the application instantiate arbitrary Java types. With a SnakeYAML version earlier than 2.0 on the classpath, this unsafe deserialization can lead to the execution of attacker-chosen code.

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 Kubernetes.

Details

Module Info

Vulnerability Info

This Medium-severity vulnerability is found in the org.springframework.cloud:spring-cloud-kubernetes-commons package in multiple versions of Spring Cloud Kubernetes.

When Spring Cloud Kubernetes reads a ConfigMap or Secret, SourceDataEntriesProcessor treats any data entry whose name ends in .yml or .yaml as a YAML document. It passes the entry's value to the parser returned by PropertySourceUtils.yamlParserGenerator, which hands it to ProfileActivationAwareYamlPropertiesFactoryBean.createProperties. That method parses the content with a SnakeYAML Yaml instance created with its default constructor:

Map<String, Object> createProperties(String source) {
        LinkedHashMap<String, Object> finalMap = new LinkedHashMap<>();
        Yaml yaml = new Yaml();

        Resource resource = new ByteArrayResource(source.getBytes(StandardCharsets.UTF_8));
        try (Reader reader = new UnicodeReader(resource.getInputStream())) {
                Iterable<Object> iterable = yaml.loadAll(reader);
                // ...

The Yaml instance is built without a SafeConstructor and without the type restrictions that Spring Framework's own YamlProcessor applies to the YAML it loads. In SnakeYAML versions earlier than 2.0, the default constructor resolves global tags such as !!com.example.SomeClass to Java classes and invokes their constructors and setters while the document is loaded. An attacker with write access to a ConfigMap or Secret that the application consumes can therefore place a crafted .yaml entry in it, and the application instantiates the attacker-chosen types when it loads its configuration. Depending on the classes available on the classpath, this can be used to execute arbitrary code in the application.

Mitigation

Only recent versions of Spring Cloud Kubernetes 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 Kubernetes.
  • 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-59434
PROJECT Affected
Spring Cloud Kubernetes
Versions Affected
>=3.1.0 <=3.2.4, >=3.3.0 <=3.3.4, >=5.0.0 <=5.0.4
NES Versions Affected
Published date
November 20, 2026
≈ Fix date
Category
Remote Code Execution
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.