Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVE-2021-21353 (High) detected in pug-2.0.0-beta6.tgz, pug-code-gen-1.1.1.tgz #98

Open
mend-bolt-for-github bot opened this issue Mar 23, 2021 · 0 comments
Labels
security vulnerability Security vulnerability detected by WhiteSource

Comments

@mend-bolt-for-github
Copy link
Contributor

mend-bolt-for-github bot commented Mar 23, 2021

CVE-2021-21353 - High Severity Vulnerability

Vulnerable Libraries - pug-2.0.0-beta6.tgz, pug-code-gen-1.1.1.tgz

pug-2.0.0-beta6.tgz

A clean, whitespace-sensitive template language for writing HTML

Library home page: https://registry.npmjs.org/pug/-/pug-2.0.0-beta6.tgz

Path to dependency file: /api/package.json

Path to vulnerable library: /api/node_modules/pug/package.json

Dependency Hierarchy:

  • pillars-0.7.1.tgz (Root Library)
    • templated-0.3.9.tgz
      • pug-2.0.0-beta6.tgz (Vulnerable Library)
pug-code-gen-1.1.1.tgz

Default code-generator for pug. It generates HTML via a JavaScript template function.

Library home page: https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-1.1.1.tgz

Path to dependency file: /api/package.json

Path to vulnerable library: /api/node_modules/pug-code-gen/package.json

Dependency Hierarchy:

  • pillars-0.7.1.tgz (Root Library)
    • templated-0.3.9.tgz
      • pug-2.0.0-beta6.tgz
        • pug-code-gen-1.1.1.tgz (Vulnerable Library)

Found in HEAD commit: 8b1ef684a59fb2d7ff8d97e44852b6f9e2628ad6

Vulnerability Details

Pug is an npm package which is a high-performance template engine. In pug before version 3.0.1, 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. This is fixed in version 3.0.1. This advisory applies to multiple pug packages including "pug", "pug-code-gen". pug-code-gen has a backported fix at version 2.0.3. This advisory is not exploitable 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.

Publish Date: 2021-03-03

URL: CVE-2021-21353

CVSS 3 Score Details (9.0)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: High
    • Privileges Required: None
    • User Interaction: None
    • Scope: Changed
  • Impact Metrics:
    • Confidentiality Impact: High
    • Integrity Impact: High
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: GHSA-p493-635q-r6gr

Release Date: 2021-03-03

Fix Resolution: pug -3.0.1, pug-code-gen-2.0.3, pug-code-gen-3.0.2


Step up your Open Source Security Game with WhiteSource here

@mend-bolt-for-github mend-bolt-for-github bot added the security vulnerability Security vulnerability detected by WhiteSource label Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security vulnerability Security vulnerability detected by WhiteSource
Projects
None yet
Development

No branches or pull requests

0 participants