GHSA-3965-hpx2-q597

Suggest an improvement
Source
https://github.com/advisories/GHSA-3965-hpx2-q597
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/05/GHSA-3965-hpx2-q597/GHSA-3965-hpx2-q597.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-3965-hpx2-q597
Aliases
Related
Published
2024-05-24T14:45:02Z
Modified
2024-07-05T21:33:03Z
Severity
  • 6.8 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N CVSS Calculator
Summary
Pug allows JavaScript code execution if an application accepts untrusted input
Details

Pug through 3.0.2 allows JavaScript code execution if an application accepts untrusted input for the name option of the compileClient, compileFileClient, or compileClientWithDependenciesTracked function. NOTE: these functions are for compiling Pug templates into JavaScript, and there would typically be no reason to allow untrusted callers.

Database specific
{
    "nvd_published_at": "2024-05-24T06:15:08Z",
    "cwe_ids": [
        "CWE-94"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2024-05-24T14:45:02Z"
}
References

Affected packages

npm / pug-code-gen

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.0.3

Database specific

{
    "last_known_affected_version_range": "<= 2.0.3"
}

npm / pug

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.0.3

Database specific

{
    "last_known_affected_version_range": "<= 3.0.2"
}