Spring Framework Unintended Constructor and Method Invocation via Type Conversion in SpEL

MEDIUM | NOVEMBER 19, 2026 | CVE-2026-59430

Description

Applications which accept user-supplied Spring Expression Language (SpEL) expressions and evaluate them with a SimpleEvaluationContext may be vulnerable to the invocation of constructors or methods through implicit type conversion, bypassing the restrictions on constructor and method invocations.

Specifically, an application is vulnerable when all the following conditions are met:

  • The application accepts and evaluates untrusted or user-controlled SpEL expressions using SimpleEvaluationContext.
  • The SimpleEvaluationContext uses its default type converter, or it is configured with a TypeConverter or ConversionService that includes the default converters of DefaultConversionService — for example, a DefaultConversionService or a ConversionService populated via DefaultConversionService.addDefaultConverters().

Affected Spring Products and Versions

Spring Framework:

  • 7.0.0 - 7.0.10
  • 6.2.0 - 6.2.20
  • 6.1.0 - 6.1.29
  • 6.0.0 - 6.0.32
  • 5.3.0 - 5.3.50
  • 5.2.26.RELEASE and earlier

Mitigation

Users of affected versions should upgrade to the corresponding fixed version.
Fix versionAvailability
7.0.11OSS
7.0.10.1Enterprise Support Only
6.2.21Enterprise Support Only
6.1.30Enterprise Support Only
6.0.33Enterprise Support Only
5.3.51Enterprise Support Only
5.2.27.RELEASEEnterprise Support Only

Fixed versions of Spring Framework configure SimpleEvaluationContext with a restricted ConversionService by default, which does not convert values by reflectively invoking constructors or methods. Conversions for common types remain supported, and applications that require an additional conversion can register a dedicated converter via the withConverter() method of the SimpleEvaluationContext builder.

A custom TypeConverter or ConversionService registered via the SimpleEvaluationContext builder is used as-is. Applications that register a DefaultConversionService or a ConversionService populated via DefaultConversionService.addDefaultConverters() should upgrade and register dedicated converters via withConverter() instead.

The previous behavior can be restored globally by setting the spring.expression.reflectiveConversion JVM system property or Spring property to true. Care should be taken when doing so, as it removes the protection provided by the restricted ConversionService.

Applications that cannot upgrade immediately can configure each SimpleEvaluationContext with a custom ConversionService that only supports the conversions required by the application — for example, a GenericConversionService with explicitly registered converters — via the withConversionService() method of the SimpleEvaluationContext builder.

Credit

This issue was reported by WangYuhui.

History

  • 2026-11-19: Initial vulnerability report published.

Get ahead

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

Learn more

Get support

TrueSource Spring Enterprise 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