QID 982929
QID 982929: Nodejs (npm) Security Update for pug-code-gen (GHSA-p493-635q-r6gr)
Security update has been released for pug-code-gen,pug to fix the vulnerability.
Note: The preceding description block is extracted directly from the security advisory. Using automation, we have attempted to clean and format it as much as possible without introducing additional issues.
If a remote attacker was able to control the `pretty` option of the pug compiler, e.g. if you spread a user provided object such as the query parameters of a request into the pug template inputs, it was possible for them to achieve remote code execution on the node.js backend.
Solution
Upgrade to `[email protected]` or `[email protected]` or `[email protected]`, which correctly sanitise the parameter.Workaround:
If there is no way for un-trusted input to be passed to pug as the `pretty` option, e.g. if you compile templates in advance before applying user input to them, you do not need to upgrade.
If there is no way for un-trusted input to be passed to pug as the `pretty` option, e.g. if you compile templates in advance before applying user input to them, you do not need to upgrade.
Vendor References
- GHSA-p493-635q-r6gr -
github.com/advisories/GHSA-p493-635q-r6gr
CVEs related to QID 982929
Software Advisories
| Advisory ID | Software | Component | Link |
|---|---|---|---|
| GHSA-p493-635q-r6gr | pug |
|
|
| GHSA-p493-635q-r6gr | pug-code-gen |
|