8.4high
OS command injection in jsii-diff in AWS jsii
- Severity
- 8.4high CVSS:4.0 by AMZN
- Exploit likelihood
- 1.08% (higher than 65% of CVEs)
- Published
- Last changed
- Assigned by
- AMZN
- Also known as
- GHSA-wcx4-wpfv-mc5c
Description
OS command injection in the npm package loading component in AWS jsii-diff before 1.131.0 might allow context-dependent attackers to execute arbitrary commands via crafted package specifiers passed to the npm: source argument. To mitigate this issue, users should upgrade to jsii-diff v1.131.0 or later.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| AWS jsii | before 1.131.0 | CVE List |
| jsii-diff (npm) | before 1.131.0 | GitHub Advisory Database |
All scores
| AMZN | 8.4high CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| AMZN | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| GitHub | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| GitHub | high CVSS:4.0 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
OS command injection in the npm package loading component in AWS jsii-diff before 1.131.0 might allow context-dependent attackers to execute arbitrary commands via crafted package specifiers passed to the npm: source argument. To mitigate this issue, users should upgrade to jsii-diff v1.131.0 or later.
GitHub Advisory Database
Summary
jsii-diff is a command line tool to compare the API differences between two jsii assemblies, and report errors if there are backwards-incompatible changes to the API. An issue exists where specially formatted command line arguments can be used to execute shell commands via this tool.
Impact
jsii-diff supports downloading packages to compare directly from NPM, so that you can compare a proposed candidate version of your jsii package with an already-published version, by passing an argument that looks like npm:<package-specifier>. For example:
jsii-diff npm:my-package@latest .
By injecting a ; into the package-specifier part of that command, jsii-diff can be tricked into running shell commands. For example:
jsii-diff "npm:lodash; touch /tmp/123" .
This allows anyone that can control the command-line arguments to jsii-diff to run arbitrary commands with the same permissions as the jsii-diff command itself.
Patches
This issue has been addressed in jsii-diff version 1.131.0. We recommend upgrading to the latest version and ensuring any forked or derivative code is patched to incorporate the new fixes.
Workarounds
If you are unable to update, make sure only trusted actors can control the arguments passed to jsii-diff.
References
If you have any questions or comments about this advisory, AWS asks that you contact AWS Security via the vulnerability reporting page or directly via email to aws-security@amazon.com. Please do not create a public GitHub issue.
NVD (es)
Inyección de comandos del sistema operativo en el componente de carga de paquetes npm en AWS jsii-diff anterior a 1.131.0 podría permitir a atacantes dependientes del contexto ejecutar comandos arbitrarios a través de especificadores de paquete manipulados pasados al argumento npm: source. Para mitigar este problema, los usuarios deberían actualizar a jsii-diff v1.131.0 o posterior.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-15895 changed 2026-07-15 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-wcx4-wpfv-mc5c changed 2026-08-07 | CC-BY-4.0 |
| NVD | CVE-2026-15895 changed 2026-10-24 | Public domain |