Executive brief
Espressif Shared GitHub DangerJS is a tool used in software development to automate code reviews and pull request feedback. A security flaw allowed external contributors to run unauthorized code within the automated build environment by submitting a malicious pull request. This could allow an attacker to steal security tokens or modify project data, depending on the permissions granted to the automated workflow.
Technical details
The vulnerability stems from an uncontrolled search path (CWE-427) and the inclusion of functionality from an untrusted control sphere (CWE-829) within the action's entrypoint.sh script. When a workflow uses pull_request_target, the action copies the fork's checkout into the workspace and then executes DangerJS using 'npx'. Because 'npx' and Node.js module resolution look in the current working directory, an attacker can provide a malicious binary or 'node_modules' directory in their fork to hijack execution. This allows for arbitrary code execution within the runner container. If the workflow has elevated GITHUB_TOKEN permissions (e.g., pull-requests: write or contents: write), the attacker can exfiltrate secrets or modify the upstream repository. The issue is fixed in version 1.0.1 by using absolute paths for binaries and clearing the workspace node_modules before execution.
Affected products
- Espressif Systems shared-github-dangerjs <= 1.0.0
Timeline
- 2026-05-08: advisory: GitHub Security Advisory published by maintainer
- 2026-05-28: disclosed: CVE published to NVD
- 2026-05-28: patched: Version 1.0.1 released