{"id":"GHSA-qg8p-v9q4-gh34","revision":"139edfd492b74f2eb43f19c3c01a6469","records":[{"revision":"139edfd492b74f2eb43f19c3c01a6469","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-qg8p-v9q4-gh34","aliases":["CVE-2016-10541"],"title":"Potential Command Injection in shell-quote","description":"Affected versions of `shell-quote` do not properly escape command line arguments, which may result in command injection if the library is used to escape user input destined for use as command line arguments.\n\n\n\n## Proof of Concept:\n\nThe following characters are not escaped properly: `>`,`;`,`{`,`}`\n\nBash has a neat but not well known feature known as \"Bash Brace Expansion\", wherein a sub-command can be executed without spaces by running it between a set of `{}` and using the `,` instead of ` ` to seperate arguments. Because of this, full command injection is possible even though it was initially thought to be impossible. \n\n```\n   const quote = require('shell-quote').quote;\n   console.log(quote(['a;{echo,test,123,234}']));\n   // Actual                    \"a;{echo,test,123,234}\"\n   // Expected                  \"a\\;\\{echo,test,123,234\\}\"\n   // Functional Equivalent     \"a; echo 'test' '123' '1234'\"\n```\n\n\n\n## Recommendation\n\nUpdate to version 1.6.1 or later.","state":0,"publishedAt":"2019-02-18T23:58:29+00:00","modifiedAt":"2026-09-10T03:48:38.9138252+00:00","affected":[{"ecosystem":"npm","name":"shell-quote","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.6.1"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://nvd.nist.gov/vuln/detail/CVE-2016-10541","https://github.com/advisories/GHSA-qg8p-v9q4-gh34","https://www.npmjs.com/advisories/117"],"sourceUrl":"https://github.com/advisories/GHSA-qg8p-v9q4-gh34","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-qg8p-v9q4-gh34","identifiers":["GHSA-qg8p-v9q4-gh34","CVE-2016-10541"]},"retained":false,"historicalAffected":[]}],"coverage":[]}