CVE-2023-40340 is a medium-severity (CVSS 4.3) vulnerability in org.jenkins-ci.plugins:nodejs. A fix is available for org.jenkins-ci.plugins:nodejs — see the affected versions and patch details below.
Jenkins NodeJS Plugin improper credential masking vulnerability
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2023-40340.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
org.jenkins-ci.plugins:nodejsReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
Jenkins NodeJS Plugin integrates with Config File Provider Plugin to specify custom NPM settings, including credentials for authentication, in a Npm config file.
NodeJS Plugin 1.6.0 and earlier does not properly mask (i.e., replace with asterisks) credentials specified in the Npm config file in Pipeline build logs.
NodeJS Plugin 1.6.1 masks credentials specified in the Npm config file in Pipeline build logs.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.jenkins-ci.plugins:nodejs | all versions | 1.6.1org.jenkins-ci.plugins:nodejs:1.6.1 |
Affected Products
nodejsjenkinsDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.jenkins-ci.plugins:nodejs, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.jenkins-ci.plugins:nodejs to 1.6.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2023-40340 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Frequently Asked Questions
Is CVE-2023-40340 in your dependencies?
Find it across Maven, including transitive dependencies.