All Vulnerability Reports

CVE-2021-22047: Potential Security Bypass for customized Spring Data REST Resource




Spring by VMware


In Spring Data REST versions 3.4.0 - 3.4.13, 3.5.0 - 3.5.5, and older unsupported versions, HTTP resources implemented by custom controllers using a configured base API path and a controller type-level request mapping are additionally exposed under URIs that can potentially be exposed for unauthorized access depending on the Spring Security configuration. The vulnerability only applies to projects for which all the following points are true:

  • The project uses Spring Data REST in one of the versions declared vulnerable above.
  • The Spring Data REST base path configuration is set to a non-empty string.
  • The project registers a custom Spring MVC controller to customize HTTP resources in the URI space of Spring Data REST and that controller uses a type-level @RequestMapping annotation;the project only secures the paths exposed by Spring Data REST within the base path but does not apply security measures to URIs matching the mappings without the configured base path prepended.

Affected VMware Products and Versions

Severity is medium unless otherwise noted.

  • Spring Data REST
    • 3.4.0 to 3.4.13
    • 3.5.0 to 3.5.5
    • Older, unsupported versions are also affected


Users of affected versions should upgrade to one of the versions below. No other steps are necessary.

  • Spring Data REST
    • 3.4.14+ (included in Spring Boot 2.4.12+)
    • 3.5.6+ (included in Spring Boot 2.5.6+)


This vulnerability was initially discovered and responsibly reported by Brian Schrader.



2021-10-26: Initial vulnerability report published.