CVE-2022-46166: CWE-94: Improper Control of Generation of Code ('Code Injection') in codecentric spring-boot-admin
Spring boot admins is an open source administrative user interface for management of spring boot applications. All users who run Spring Boot Admin Server, having enabled Notifiers (e.g. Teams-Notifier) and write access to environment variables via UI are affected. Users are advised to upgrade to the most recent releases of Spring Boot Admin 2.6.10 and 2.7.8 to resolve this issue. Users unable to upgrade may disable any notifier or disable write access (POST request) on `/env` actuator endpoint.
AI Analysis
Technical Summary
CVE-2022-46166 is a medium-severity code injection vulnerability (CWE-94) affecting the open-source project Spring Boot Admin, specifically versions prior to 2.6.10. Spring Boot Admin is a widely used administrative user interface designed for managing Spring Boot applications. The vulnerability arises when the Spring Boot Admin Server has enabled Notifiers (such as Teams-Notifier) and allows users to write to environment variables through the UI, particularly via POST requests to the `/env` actuator endpoint. Improper control over code generation in this context means that an attacker with write access to environment variables can inject malicious code that may be executed by the server. This can lead to unauthorized code execution within the context of the Spring Boot Admin Server process. The issue is mitigated in versions 2.6.10 and 2.7.8 and later. For users unable to upgrade, disabling any notifier functionality or restricting write access to the `/env` endpoint is advised. No known exploits have been reported in the wild, but the vulnerability presents a significant risk due to the potential for remote code execution if an attacker gains the necessary privileges to manipulate environment variables via the UI. The vulnerability requires that the attacker have authenticated access with write permissions to the environment variables endpoint, which limits the attack surface but does not eliminate risk, especially in environments where multiple users have administrative privileges or where the UI is exposed to untrusted networks.
Potential Impact
For European organizations, the impact of this vulnerability can be substantial, particularly for enterprises and public sector entities that rely on Spring Boot Admin for managing critical Spring Boot applications. Successful exploitation could lead to unauthorized code execution, potentially compromising the confidentiality, integrity, and availability of managed applications and underlying infrastructure. This could result in data breaches, service disruptions, or lateral movement within internal networks. Given that Spring Boot is popular in enterprise Java environments, organizations using vulnerable versions may face risks of operational downtime and reputational damage. The requirement for authenticated write access somewhat limits the risk to insider threats or attackers who have already compromised credentials, but it remains a critical concern for organizations with large administrative teams or insufficient access controls. Additionally, the integration with notification systems like Teams-Notifier could be abused to propagate malicious payloads or trigger further attacks. The lack of known exploits in the wild suggests that immediate widespread exploitation is not occurring, but the vulnerability should be treated proactively to prevent future incidents.
Mitigation Recommendations
1. Immediate upgrade to Spring Boot Admin versions 2.6.10 or 2.7.8 (or later) to apply the official patch addressing this vulnerability. 2. If upgrading is not immediately feasible, disable all notifier functionalities, especially those that allow external communication such as Teams-Notifier, to reduce the attack surface. 3. Restrict or disable write (POST) access to the `/env` actuator endpoint via network-level controls (firewalls, API gateways) or application-level security policies to prevent unauthorized environment variable modifications. 4. Implement strict access controls and audit logging on the Spring Boot Admin UI to monitor and limit users who have write permissions to environment variables. 5. Conduct regular reviews of user privileges and ensure that only trusted administrators have access to sensitive endpoints. 6. Employ network segmentation to isolate management interfaces from public or less-trusted networks, reducing exposure to potential attackers. 7. Monitor logs and alerts for unusual activity related to environment variable changes or notifier usage, enabling early detection of exploitation attempts.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Belgium, Italy
CVE-2022-46166: CWE-94: Improper Control of Generation of Code ('Code Injection') in codecentric spring-boot-admin
Description
Spring boot admins is an open source administrative user interface for management of spring boot applications. All users who run Spring Boot Admin Server, having enabled Notifiers (e.g. Teams-Notifier) and write access to environment variables via UI are affected. Users are advised to upgrade to the most recent releases of Spring Boot Admin 2.6.10 and 2.7.8 to resolve this issue. Users unable to upgrade may disable any notifier or disable write access (POST request) on `/env` actuator endpoint.
AI-Powered Analysis
Technical Analysis
CVE-2022-46166 is a medium-severity code injection vulnerability (CWE-94) affecting the open-source project Spring Boot Admin, specifically versions prior to 2.6.10. Spring Boot Admin is a widely used administrative user interface designed for managing Spring Boot applications. The vulnerability arises when the Spring Boot Admin Server has enabled Notifiers (such as Teams-Notifier) and allows users to write to environment variables through the UI, particularly via POST requests to the `/env` actuator endpoint. Improper control over code generation in this context means that an attacker with write access to environment variables can inject malicious code that may be executed by the server. This can lead to unauthorized code execution within the context of the Spring Boot Admin Server process. The issue is mitigated in versions 2.6.10 and 2.7.8 and later. For users unable to upgrade, disabling any notifier functionality or restricting write access to the `/env` endpoint is advised. No known exploits have been reported in the wild, but the vulnerability presents a significant risk due to the potential for remote code execution if an attacker gains the necessary privileges to manipulate environment variables via the UI. The vulnerability requires that the attacker have authenticated access with write permissions to the environment variables endpoint, which limits the attack surface but does not eliminate risk, especially in environments where multiple users have administrative privileges or where the UI is exposed to untrusted networks.
Potential Impact
For European organizations, the impact of this vulnerability can be substantial, particularly for enterprises and public sector entities that rely on Spring Boot Admin for managing critical Spring Boot applications. Successful exploitation could lead to unauthorized code execution, potentially compromising the confidentiality, integrity, and availability of managed applications and underlying infrastructure. This could result in data breaches, service disruptions, or lateral movement within internal networks. Given that Spring Boot is popular in enterprise Java environments, organizations using vulnerable versions may face risks of operational downtime and reputational damage. The requirement for authenticated write access somewhat limits the risk to insider threats or attackers who have already compromised credentials, but it remains a critical concern for organizations with large administrative teams or insufficient access controls. Additionally, the integration with notification systems like Teams-Notifier could be abused to propagate malicious payloads or trigger further attacks. The lack of known exploits in the wild suggests that immediate widespread exploitation is not occurring, but the vulnerability should be treated proactively to prevent future incidents.
Mitigation Recommendations
1. Immediate upgrade to Spring Boot Admin versions 2.6.10 or 2.7.8 (or later) to apply the official patch addressing this vulnerability. 2. If upgrading is not immediately feasible, disable all notifier functionalities, especially those that allow external communication such as Teams-Notifier, to reduce the attack surface. 3. Restrict or disable write (POST) access to the `/env` actuator endpoint via network-level controls (firewalls, API gateways) or application-level security policies to prevent unauthorized environment variable modifications. 4. Implement strict access controls and audit logging on the Spring Boot Admin UI to monitor and limit users who have write permissions to environment variables. 5. Conduct regular reviews of user privileges and ensure that only trusted administrators have access to sensitive endpoints. 6. Employ network segmentation to isolate management interfaces from public or less-trusted networks, reducing exposure to potential attackers. 7. Monitor logs and alerts for unusual activity related to environment variable changes or notifier usage, enabling early detection of exploitation attempts.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2022-11-28T17:27:19.998Z
- Cisa Enriched
- true
Threat ID: 682d9846c4522896dcbf4f02
Added to database: 5/21/2025, 9:09:26 AM
Last enriched: 6/22/2025, 11:07:52 AM
Last updated: 8/12/2025, 4:03:19 AM
Views: 13
Related Threats
CVE-2025-8878: CWE-94 Improper Control of Generation of Code ('Code Injection') in properfraction Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress
MediumCVE-2025-8143: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in pencidesign Soledad
MediumCVE-2025-8142: CWE-98 Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion') in pencidesign Soledad
HighCVE-2025-8105: CWE-94 Improper Control of Generation of Code ('Code Injection') in pencidesign Soledad
HighCVE-2025-8719: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in reubenthiessen Translate This gTranslate Shortcode
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.