CVE-2023-38493: Armeria Paths Contain Matrix Variables Bypass Vulnerability

HIGH
Advisory Identifier: GHSA-wvp2-9ppw-337j
CVSS 7.5
CWE-863
Published
Advisory Summary

CVE-2023-38493 is a HIGH (CVSS 7.5) paths contain matrix variables bypass vulnerability (CWE-863: Incorrect Authorization) affecting Armeria libraries in the Maven ecosystem. The issue involves paths contain matrix variables bypass decorators. Remediation is available by upgrading affected packages to version 1.24.3.

CVE-2023-38493 at a Glance

CVE Identifier CVE-2023-38493
GHSA Identifier GHSA-wvp2-9ppw-337j
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-863: Incorrect Authorization
Affected Product Armeria
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2023-38493

To remediate this vulnerability, upgrade all affected Armeria dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

com.linecorp.armeria:armeria fixed: 1.24.3
<dependency>
    <groupId>com.linecorp.armeria</groupId>
    <artifactId>armeria</artifactId>
    <version>1.24.3</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=com.linecorp.armeria

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2023-38493, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=com.linecorp.armeria

Analyze the terminal output to locate any version of Armeria in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.24.3), your application is affected.

Note: The mvn dependency:tree -Dincludes=com.linecorp.armeria command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Armeria, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Spring supports [Matrix variables](https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-controller/ann-methods/matrix-variables.html). 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.*"`

CVE-2023-38493 Affected Armeria Versions

1 component(s)
Fixed Versions:
1.24.3
Product / Package Ecosystem Affected Versions Fixed Version
com.linecorp.armeria:armeria
Maven
< 1.24.3
1.24.3

References

Frequently Asked Questions

What is CVE-2023-38493?
CVE-2023-38493 is a security vulnerability in Armeria involving Paths contain matrix variables bypass decorators under CWE-863: Incorrect Authorization.
Which Armeria versions are affected?
Affected versions include releases prior to 1.24.3 across affected packages: com.linecorp.armeria:armeria.
What version fixes CVE-2023-38493?
Upgrading to 1.24.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is armeria affected?
Yes, com.linecorp.armeria:armeria is affected in releases prior to 1.24.3. Upgrade your dependency to 1.24.3 or later.
What is the CVSS score of CVE-2023-38493?
CVE-2023-38493 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2023-38493?
CVE-2023-38493 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Maven dependencies for CVE-2023-38493?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.linecorp.armeria'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-wvp2-9ppw-337j",
  "modified" : "2023-07-25T18:24:39Z",
  "published" : "2023-07-25T18:24:39Z",
  "aliases" : [ "CVE-2023-38493" ],
  "summary" : "Paths contain matrix variables bypass decorators",
  "details" : "### Impact\nSpring supports [Matrix variables](https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-controller/ann-methods/matrix-variables.html).\nWhen Spring integration is used, Armeria calls Spring controllers via `TomcatService` or `JettyService` with the path\nthat may contain matrix variables.\nIn this situation, the Armeria decorators might not invoked because of the matrix variables.\nLet's see the following example:\n```\n// Spring controller\n@GetMapping(\"/important/resources\")\npublic String important() {...}\n\n// Armeria decorator\nServerBuilder sb = ...\nsb.decoratorUnder(\"/important/\", authService);\n```\nIf an attacker sends a request with `/important;a=b/resources`, the request would bypass the authrorizer\n\n### Patches\n- https://github.com/line/armeria-ghsa-wvp2-9ppw-337j/commit/9b0ec3e099cc05fbff11d7f1012a1dddb0000d0c\n\n### Workarounds\nUsers can add decorators using regex. `e.g. \"regex:^/important.*\"`\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.linecorp.armeria:armeria"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.24.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.24.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/line/armeria/security/advisories/GHSA-wvp2-9ppw-337j"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-38493"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/line/armeria/commit/039db50bbfc88014ea8737fd1e1ddd6fd3fc4f07"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/line/armeria/commit/49e04ef231ad65750739529c7fa4ce946ff7588b"
  }, {
    "type" : "WEB",
    "url" : "https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-controller/ann-methods/matrix-variables.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/line/armeria"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-25T18:24:39Z",
    "nvd_published_at" : "2023-07-25T21:15:10Z"
  }
}