In Spring for Apache Kafka, SSRF via DNS resolution triggered by untrusted java.net types in header mapper default trusted packages

MEDIUM | AUGUST 20, 2026 | CVE-2026-59278

Description

JsonKafkaHeaderMapper and DefaultKafkaHeaderMapper include java.net in their default trusted packages list. When these mappers are used — which is the default configuration for all @KafkaListener consumers — an external Kafka producer can inject a java.net.InetAddress type via the spring_json_header_types message header. Jackson's built-in InetAddress deserialization calls InetAddress.getByName(), which immediately triggers a DNS resolution, enabling Server-Side Request Forgery (SSRF) in the default configuration.

Affected Spring Products and Versions

Spring for Apache Kafka:

  • 4.1.0 - 4.1.0
  • 4.0.0 - 4.0.6
  • 3.0.0 - 3.3.16
  • 2.9.0 - 2.9.14
  • 2.8.12 and earlier

Mitigation

Users of affected versions should upgrade to the corresponding fixed version.
Fix versionAvailability
4.1.1OSS
4.1.0.1Enterprise Support Only
4.0.7OSS
4.0.6.1Enterprise Support Only
3.3.17Enterprise Support Only
2.9.15Enterprise Support Only
2.8.13Enterprise Support Only

No further mitigation steps are necessary.

Credit

The issue was identified and responsibly reported by Sharlong Wen (@Sharlong-Wen).

History

  • 2026-08-20: Initial vulnerability report published.

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all