Vulnerabilities in pkg:maven/de.codecentric/spring-boot-admin

PACKAGE
Advisory Identifier: GHSA-w3x5-427h-wfq6
Advisory Summary

CVE-2022-46166 is a HIGH (CVSS 8.0) spring boot admins integrated notifier vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Spring Framework libraries in the Maven ecosystem. The issue involves spring boot admins integrated notifier support allows arbitrary code execution. Remediation is available by upgrading affected packages to version 2.6.10, 2.7.8, 3.0.0-M6.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/de.codecentric/spring-boot-admin

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/de.codecentric/spring-boot-admin. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-w3x5-427h-wfq6 CVE-2022-46166 HIGH Spring Boot Admins integrated notifier support allows arbitrary code execution

CVE-2022-46166 at a Glance

CVE Identifier CVE-2022-46166
GHSA Identifier GHSA-w3x5-427h-wfq6
Severity HIGH
CVSS v3.1 Base Score 8.0
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Spring Framework
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.0

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

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

How to Fix CVE-2022-46166

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

de.codecentric:spring-boot-admin fixed: 2.6.10
<dependency>
    <groupId>de.codecentric</groupId>
    <artifactId>spring-boot-admin</artifactId>
    <version>2.6.10</version>
</dependency>
de.codecentric:spring-boot-admin fixed: 2.7.8
<dependency>
    <groupId>de.codecentric</groupId>
    <artifactId>spring-boot-admin</artifactId>
    <version>2.7.8</version>
</dependency>
de.codecentric:spring-boot-admin fixed: 3.0.0-M6
<dependency>
    <groupId>de.codecentric</groupId>
    <artifactId>spring-boot-admin</artifactId>
    <version>3.0.0-M6</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=de.codecentric

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=de.codecentric

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

Note: The mvn dependency:tree -Dincludes=de.codecentric 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Spring Framework, 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 All users who run Spring Boot Admin Server, having enabled Notifiers (e.g. Teams-Notifier) and write access to environment variables via UI are possibly affected. ### Patches In the most recent releases of Spring Boot Admin 2.6.10 and 2.7.8 the issue is fixed by implementing `SimpleExecutionContext` of SpEL. This prevents the arbitrary code execution (i.e. SpEL injection). ### Workarounds * Disable any notifier * Disable write access (POST request) on `/env` actuator endpoint

CVE-2022-46166 Affected Spring Framework Versions

3 component(s)
Fixed Versions:
2.6.102.7.83.0.0-M6
Product / Package Ecosystem Affected Versions Fixed Version
de.codecentric:spring-boot-admin
Maven
< 2.6.10
2.6.10
de.codecentric:spring-boot-admin
Maven
≥ 2.7.0
< 2.7.8
2.7.8
de.codecentric:spring-boot-admin
Maven
≥ 3.0.0-M1
< 3.0.0-M6
3.0.0-M6

References

Frequently Asked Questions

What is CVE-2022-46166?
CVE-2022-46166 is a security vulnerability in Spring Framework involving Spring Boot Admins integrated notifier support allows arbitrary code execution under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Spring Framework versions are affected?
Affected versions include releases prior to 2.6.10, 2.7.8, 3.0.0-M6 across affected packages: de.codecentric:spring-boot-admin.
What version fixes CVE-2022-46166?
Upgrading to 2.6.10, 2.7.8, 3.0.0-M6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is spring-boot-admin affected?
Yes, de.codecentric:spring-boot-admin is affected in releases prior to 2.6.10, 2.7.8, 3.0.0-M6. Upgrade your dependency to 2.6.10, 2.7.8, 3.0.0-M6 or later.
What is the CVSS score of CVE-2022-46166?
CVE-2022-46166 has a CVSS v3.1 base score of 8.0 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2022-46166?
CVE-2022-46166 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Maven dependencies for CVE-2022-46166?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=de.codecentric'. 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-w3x5-427h-wfq6",
  "modified" : "2022-12-09T20:19:32Z",
  "published" : "2022-12-09T20:19:32Z",
  "aliases" : [ "CVE-2022-46166" ],
  "summary" : "Spring Boot Admins integrated notifier support allows arbitrary code execution",
  "details" : "### Impact\nAll users who run Spring Boot Admin Server, having enabled Notifiers (e.g. Teams-Notifier) and write access to environment variables via UI are possibly affected.\n\n### Patches\nIn the most recent releases of Spring Boot Admin 2.6.10 and 2.7.8 the issue is fixed by implementing `SimpleExecutionContext` of SpEL. This prevents the arbitrary code execution (i.e. SpEL injection).\n\n### Workarounds\n * Disable any notifier\n * Disable write access (POST request) on `/env` actuator endpoint\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "de.codecentric:spring-boot-admin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.6.10"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "de.codecentric:spring-boot-admin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.7.0"
      }, {
        "fixed" : "2.7.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "de.codecentric:spring-boot-admin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0-M1"
      }, {
        "fixed" : "3.0.0-M6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/codecentric/spring-boot-admin/security/advisories/GHSA-w3x5-427h-wfq6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/codecentric/spring-boot-admin"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-12-09T20:19:32Z",
    "nvd_published_at" : "2022-12-09T21:15:00Z"
  }
}