Coordinated Disclosure Timeline
- 2021-03-25: Issue reported to the maintainers.
- 2021-03-25: Issue is acknowledged.
- 2021-03-31: Issue is fixed and advisory is published.
getPackedPackage method has a command injection vulnerability. Clients of the @prisma/sdk library are unlikely to be aware of this, so they might unwittingly write code that contains a vulnerability.
Latest commit at the time of reporting (March 25, 2021).
Command injection in
The following proof-of-concept illustrates the vulnerability. First install @prisma/sdk:
npm install @prisma/sdk
Now create a file with the following contents:
const sdk = require("@prisma/sdk"); sdk.getPackedPackage("foo", "bar", "foo`touch /tmp/exploit`")
and run it:
Notice that a file named
exploit has been created.
This issue may lead to remote code execution if a client of the library calls the vulnerable method with untrusted input.
This issue was discovered and reported by GitHub Engineer @erik-krogh (Erik Krogh Kristensen).
You can contact the GHSL team at
email@example.com, please include a reference to
GHSL-2021-060 in any communication regarding this issue.