Skip to content

SpEL injection in OpenTelemetry Spring Boot configuration

Moderate
trask published GHSA-xq22-vr6w-p272 Oct 11, 2026

Package

maven io.opentelemetry.instrumentation:opentelemetry-spring-boot (Maven)

Affected versions

>= 1.17.0-alpha, <= 2.5.0-alpha

Patched versions

None
maven io.opentelemetry.instrumentation:opentelemetry-spring-boot-autoconfigure (Maven)
>= 1.13.0-alpha, <= 2.29.0
2.30.0
maven io.opentelemetry.instrumentation:opentelemetry-spring-boot-starter (Maven)
>= 1.17.0-alpha, <= 2.29.0
2.30.0

Description

Summary

The OpenTelemetry Spring Boot configuration adapters evaluated certain map-valued configuration properties as Spring Expression Language expressions. The default evaluation context permits type references, method invocation, and constructor calls. An attacker-controlled value consumed by this path can execute arbitrary Java code with the application's process privileges.

In 2.29.0, the evaluator was in SpringConfigProperties.getMap(). One affected setting is otel.instrumentation.common.peer-service-mapping. The otel.resource.attributes property and the four OTLP exporter header properties used a separate parsing path and did not reach this evaluator.

Affected releases before 2.1.0-alpha contained the equivalent evaluator in SpringResourceConfigProperties.getMap(). In those releases, exploitation requires a registered ResourceProvider bean that consumes an attacker-controlled map-valued property through that adapter.

Impact

Exploitation requires control over an affected configuration value when the application consumes it. Relevant sources include application configuration files, environment variables, system properties, and remote configuration providers.

These properties are normally consumed during SDK or instrumentation initialization. Versions 2.22.0 through 2.29.0 cache each property lookup on first access. Changing an already-resolved property does not change the value used by that configuration instance. Earlier versions do not have this cache, and lazily initialized components may first consume affected properties after application startup.

Successful exploitation can compromise the confidentiality, integrity, and availability of resources accessible to the application process.

The CVSS 3.1 score is 6.7, Medium: CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H. This assessment assumes administrative write access to local application configuration, but not existing arbitrary code-execution authority, and automatic consumption without another user's action. No concrete unauthenticated network attack path has been demonstrated in the report.

Patches

Upgrade to 2.30.0 or later of io.opentelemetry.instrumentation:opentelemetry-spring-boot-starter or io.opentelemetry.instrumentation:opentelemetry-spring-boot-autoconfigure.

The fix in #19113 removes explicit SpEL evaluation from SpringConfigProperties.getMap() and uses the OpenTelemetry SDK's comma-delimited key=value parser.

The legacy artifact io.opentelemetry.instrumentation:opentelemetry-spring-boot is discontinued. Replace it with opentelemetry-spring-boot-starter or opentelemetry-spring-boot-autoconfigure version 2.30.0 or later. No patched release exists under the legacy coordinate.

Workarounds

If upgrading is not immediately possible, restrict write access to configuration sources that can supply affected map properties to principals already trusted to execute code in the application. Include remote configuration services and runtime configuration-management interfaces.

These access controls do not remove the vulnerable evaluator.

Behavior change

Map properties parsed through the replaced SpEL path must use comma-delimited key=value syntax instead of SpEL map literals. For example, replace {key:'value'} with key=value.

Credits

Reported by @lucianjohnhouse.

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
High
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

CVE ID

No known CVE

Weaknesses

Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')

The product constructs all or part of an expression language (EL) statement in a framework such as a Java Server Page (JSP) using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended EL statement before it is executed. Learn more on MITRE.

Credits