Skip to main content

Kubernetes CVE-2025-53542

| EUVDEUVD-2025-21025 HIGH
OS Command Injection (CWE-78)
2025-07-10 security-advisories@github.com
7.7
CVSS 3.1 · GitHub Advisory
View

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK

2 techniques across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Impact

The CVSS 3.1 vector (CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H) indicates local attack vector, high complexity, no privileges required, but user interaction required—consistent with a developer or CI/CD operator initiating a macOS build. The high impact ratings (C:H, I:H, A:H) reflect full confidentiality, integrity, and availability compromise of the build system. The AC:H (high complexity) and UI:R (user interaction required) factors explain why the CVSS is 7.7 rather than critical. From a real-world perspective: (1) this is a supply-chain risk affecting developers building Headlamp on macOS, (2) no KEV or active exploitation is reported, suggesting limited current weaponization, (3) the attack surface is limited to macOS build pipelines, not production Kubernetes clusters, (4) EPSS data is not provided but would likely be moderate (5.0–7.0 range) given the environmental prerequisites. This is a legitimate priority for maintainers and organizations building/distributing Headlamp, but not a critical emergency; it ranks as medium-high in a typical organization's risk matrix because exploitation requires local access and build environment control.

Exploit ScenarioDerived

A developer clones Headlamp and attempts to build a macOS installer in a CI/CD environment (GitHub Actions, GitLab CI, Jenkins) or local development machine. An attacker has compromised the build system (e.g., via malicious workflow file, poisoned .env file, or malicious dependency injection earlier in the pipeline) and sets the environment variable teamID='$(whoami > /tmp/pwned.txt; echo apple-team-id)' or entitlementsPath='/tmp/entitlements.plist; rm -rf ~/*'. When codeSign.js executes with unsanitized values, the injected command runs with the same privileges as the build process, allowing arbitrary file exfiltration, deletion, credential theft from ~/.aws, ~/.ssh, or installation of backdoors in the resulting macOS package. The user interaction requirement (UI:R) is satisfied by the developer/operator triggering the build. AC:H is due to the attacker needing prior build system access, but once gained, exploitation is straightforward. No public POC is referenced in the CVE description, but reproduction is trivial for anyone with access to a Headlamp build environment.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Mar 16, 2026

CVE-2025-53542 is a command injection vulnerability in Headlamp's macOS packaging workflow (codeSign.js) where unsanitized environment variables and config values are passed directly to Node.js execSync() without proper escaping, allowing local attackers to execute arbitrary commands. This affects Headlamp versions prior to 0.31.1, and while no active KEV or confirmed public POC is mentioned in available data, the vulnerability has a moderate-to-high CVSS score of 7.7 with user interaction required, making it a realistic threat in CI/CD and development environments.

RemediationAI

Immediate remediation: (1) Upgrade Headlamp to version 0.31.1 or later, which should include proper input sanitization or refactored command invocation. (2) Patch codeSign.js by replacing the unsafe execSync() call with execFileSync() using an array of arguments (e.g., execFileSync('codesign', ['-s', teamID, '--entitlements', entitlementsPath, config.app]) to prevent shell interpretation), or by using a library like 'shell-escape' or 'shellwords' for proper escaping if shell execution is necessary. (3) Short-term workaround: restrict environment variable access in build pipelines using principle of least privilege; validate that ${teamID}, ${entitlementsPath}, and ${config.app} match expected patterns (regex whitelist) before the build runs. (4) Code review: audit all other Node.js build scripts (webpack config, build.js, etc.) for similar execSync() misuse. Vendor should publish a security advisory with patch details; check Headlamp's GitHub releases (github.com/kinvolk/headlamp or equivalent) for v0.31.1+ release notes.

Affected VersionsENISA

headlamp < 0.31.1

Affected Packages

euvd headlamp fix: 0.31.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability resides in the codeSign.js script used during macOS application packaging in the Headlamp Kubernetes web UI project. The root cause is improper use of Node.js's execSync() function (CWE-78: Improper Neutralization of Special Elements used in an OS Command), a classic OS command injection flaw. Specifically, template variables ${teamID}, ${entitlementsPath}, and ${config.app} are derived from environment variables or application configuration and concatenated directly into shell commands without sanitization, escaping, or argument separation. This allows an attacker who controls these environment variables (e.g., in a compromised build pipeline, through .env files, or via system environment poisoning) to inject shell metacharacters (pipes, semicolons, backticks, command substitution) to execute arbitrary code. The execSync() function spawns a shell interpreter, making it inherently dangerous with untrusted input; proper remediation requires either using execFileSync() with argument arrays or rigorous input validation/escaping.

Know when Kubernetes gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

GitHub Advisory PRIMARY 7.7 HIGH
AV:L/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H

Primary rating from GitHub Advisory · only source for this CVE.

CVSS VectorGitHub Advisory

Attack Vector
Local
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

3
Analysis Updated
Apr 16, 2026 - 06:28 EUVD-patch-fix
executive summary
Patch available
Apr 16, 2026 - 05:29 EUVD
0.31.1
CVE Published
Jul 10, 2025 - 19:15 nvd
HIGH 7.7

DescriptionGitHub Advisory

Headlamp is an extensible Kubernetes web UI. A command injection vulnerability was discovered in the codeSign.js script used in the macOS packaging workflow of the Kubernetes Headlamp project. This issue arises due to the improper use of Node.js's execSync() function with unsanitized input derived from environment variables, which can be influenced by an attacker. The variables ${teamID}, ${entitlementsPath}, and ${config.app} are dynamically derived from the environment or application config and passed directly to the shell command without proper escaping or argument separation. This exposes the system to command injection if any of the values contain malicious input. This vulnerability is fixed in 0.31.1.

Executive ViewAI

Why It Matters

Headlamp versions before 0.31.1 contain a command injection vulnerability in the macOS build pipeline that allows local attackers to execute arbitrary commands through unsanitized environment variables, creating risk in development and CI/CD workflows where multiple teams interact with build systems. Organizations using Headlamp for macOS package builds must patch immediately to prevent potential supply chain compromise and unauthorized code execution during the build process.

Business Impact: High
Compensating Controls

Until upgrade: restrict build pipeline access to authorized personnel only; implement environment variable whitelisting in CI/CD configuration; disable macOS packaging builds if not actively required; audit and log all environment variable inputs to the codeSign.js workflow. Apply vendor patch (Headlamp version 0.31.1 or later).

Threat Intelligence Overview

EPSS Score
0.0%
Top 95% exploitable
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

CVE-2025-1974 CRITICAL POC
9.8 Mar 25

A critical vulnerability in Kubernetes ingress-nginx controller allows unauthenticated attackers with pod network access

CVE-2026-45321 CRITICAL POC
9.6 May 12

Credential-harvesting malware compromised 84 versions of 42 TanStack npm packages on 2026-05-11 via chained GitHub Actio

CVE-2025-1098 HIGH POC
8.8 Mar 25

Kubernetes ingress-nginx contains a configuration injection vulnerability via the mirror-target and mirror-host Ingress

CVE-2025-24514 HIGH POC
8.8 Mar 25

A security issue was discovered in ingress-nginx https://github.com/kubernetes/ingress-nginx where the `auth-url` Ingres

CVE-2025-1097 HIGH POC
8.8 Mar 25

A security issue was discovered in ingress-nginx https://github.com/kubernetes/ingress-nginx where the `auth-tls-match-c

CVE-2020-8554 MEDIUM POC
6.3 Jan 21

Kubernetes API server in all versions allow an attacker who is able to create a ClusterIP service and set the spec.exter

CVE-2023-3676 HIGH POC
8.8 Oct 31

A security issue was discovered in Kubernetes where a user that can create pods on Windows nodes may be able to escalate

CVE-2025-55190 CRITICAL POC
9.9 Sep 04

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. Rated critical severity (CVSS 9.9), this vulne

CVE-2026-34976 CRITICAL POC
10.0 Apr 02

Unauthenticated remote attackers can trigger complete database overwrites, server-side file reads, and SSRF attacks agai

CVE-2018-18843 CRITICAL POC
10.0 Dec 04

The Kubernetes integration in GitLab Enterprise Edition 11.x before 11.2.8, 11.3.x before 11.3.9, and 11.4.x before 11.4

CVE-2026-54680 CRITICAL POC
9.9 Jul 29

Fluentd configuration injection in the kube-logging Logging operator before 6.6.0 allows a namespace-scoped user who can

CVE-2025-64709 CRITICAL POC
9.9 Nov 13

Authenticated Typebot users can abuse the webhook block (HTTP Request component) in versions prior to 3.13.1 to issue ar

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy