CVE-2023-38493
Paths contain matrix variables bypass decorators
Description
Impact
Spring supports Matrix variables.
When Spring integration is used, Armeria calls Spring controllers via TomcatService or JettyService with the path
that may contain matrix variables.
In this situation, the Armeria decorators might not invoked because of the matrix variables.
Let's see the following example:
// Spring controller
@GetMapping("/important/resources")
public String important() {...}
// Armeria decorator
ServerBuilder sb = ...
sb.decoratorUnder("/important/", authService);
If an attacker sends a request with /important;a=b/resources, the request would bypass the authrorizer
Patches
- https://github.com/line/armeria-ghsa-wvp2-9ppw-337j/commit/9b0ec3e099cc05fbff11d7f1012a1dddb0000d0c
Workarounds
Users can add decorators using regex. e.g. "regex:^/important.*"
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| com.linecorp.armeria » armeria | < 1.24.3 | 1.24.3 |
Blast radius
42% of the dependent artifacts (130) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 5,425 |
| 2 hops | 1,739 |
| 3 hops | 1,090 |
| 4 hops | 220 |
| 5 hops | 52 |
| 6 hops | 3 |
Most used dependents
- org.apache.skywalking » server-core38 usages
- com.linecorp.armeria » armeria-grpc36 usages
- com.intuit.karate » karate-core27 usages
- com.intuit.karate » karate-junit526 usages
- com.linecorp.armeria » armeria-logback18 usages
- com.intuit.karate » karate-junit416 usages
- org.apache.skywalking » library-client16 usages
- org.curioswitch.curiostack » gradle-curiostack-plugin14 usages
- com.linecorp.armeria » armeria-junit414 usages
- com.linecorp.armeria » armeria-junit514 usages
- com.linecorp.armeria » armeria-retrofit213 usages
- com.linecorp.centraldogma » centraldogma-client-armeria10 usages
- com.softwaremill.sttp.client3 » armeria-backend10 usages
- com.linecorp.armeria » armeria-spring-boot-autoconfigure9 usages
- com.linecorp.armeria » armeria-grpc-protocol9 usages
Computed from the dependency graph of build 20261202.0245 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
| Advisory | NVD CVE-2023-38493 | nvd.nist.gov |
| Package | line/armeria | github.com |
| Web | line/armeria advisory GHSA-wvp2-9ppw-337j | github.com |
| Web | line/armeria commit 039db50 | github.com |
| Web | line/armeria commit 49e04ef | github.com |
| Web | spring-framework/reference/web/webmvc/mvc-controller/ann-methods/matrix-variables.html | docs.spring.io |
