Vulnerabilities in pkg:npm/html-pdf-chrome

PACKAGE
Advisory Summary

GHSA-5p98-wpc9-g498 is a HIGH server-side request forgery vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Html pdf chrome libraries in the npm ecosystem. The issue involves server-side request forgery in html-pdf-chrome. Remediation is available by upgrading affected packages to version 0.6.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/html-pdf-chrome

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/html-pdf-chrome. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-5p98-wpc9-g498 - HIGH Server-Side Request Forgery in html-pdf-chrome

GHSA-5p98-wpc9-g498 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-5p98-wpc9-g498
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Html pdf chrome
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-5p98-wpc9-g498

To remediate this vulnerability, upgrade all affected Html pdf chrome dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

html-pdf-chrome fixed: 0.6.1
npm install html-pdf-chrome@0.6.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls html-pdf-chrome

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-5p98-wpc9-g498, inspect your project dependencies using npm:

npm ls html-pdf-chrome

Analyze the terminal output to locate any version of Html pdf chrome in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6.1), your application is affected.

Note: The npm ls html-pdf-chrome command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Html pdf chrome, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Recommendation This package is working as intended. A [Security](https://github.com/westy92/html-pdf-chrome#security) section has been added since v0.6.1 to detail proper usage of this library. Npm has revoked their advisory altogether. ## Original Advisory All versions of `html-pdf-chrome` are vulnerable to Server-Side Request Forgery (SSRF). The package executes HTTP requests if the parsed HTML contains external references to resources, such as `<iframe src="http://localhost" height="800px" width="800px"></iframe>`. This allows attackers to access resources through HTTP that are accessible to the server, including private resources in the hosting environment.

GHSA-5p98-wpc9-g498 Affected Html pdf chrome Versions

1 component(s)
Fixed Versions:
0.6.1
Product / Package Ecosystem Affected Versions Fixed Version
html-pdf-chrome
npm
< 0.6.1
0.6.1

References

Frequently Asked Questions

What is GHSA-5p98-wpc9-g498?
GHSA-5p98-wpc9-g498 is a security vulnerability in Html pdf chrome involving Server-Side Request Forgery in html-pdf-chrome under CWE-918: Server-Side Request Forgery (SSRF).
Which Html pdf chrome versions are affected?
Affected versions include releases prior to 0.6.1 across affected packages: html-pdf-chrome.
What version fixes GHSA-5p98-wpc9-g498?
Upgrading to 0.6.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is html-pdf-chrome affected?
Yes, html-pdf-chrome is affected in releases prior to 0.6.1. Upgrade your dependency to 0.6.1 or later.
What CWE is associated with GHSA-5p98-wpc9-g498?
GHSA-5p98-wpc9-g498 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check npm dependencies for GHSA-5p98-wpc9-g498?
Run the dependency tree command: 'npm ls html-pdf-chrome'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5p98-wpc9-g498",
  "modified" : "2022-06-22T19:28:32Z",
  "published" : "2020-09-04T15:21:32Z",
  "aliases" : [ ],
  "summary" : "Server-Side Request Forgery in html-pdf-chrome",
  "details" : "## Recommendation\nThis package is working as intended. A [Security](https://github.com/westy92/html-pdf-chrome#security) section has been added since v0.6.1 to detail proper usage of this library. Npm has revoked their advisory altogether.\n\n## Original Advisory\nAll versions of `html-pdf-chrome` are vulnerable to Server-Side Request Forgery (SSRF). The package executes HTTP requests if the parsed HTML contains external references to resources, such as `<iframe src=\"http://localhost\" height=\"800px\" width=\"800px\"></iframe>`. This allows attackers to access resources through HTTP that are accessible to the server, including private resources in the hosting environment.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "html-pdf-chrome"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.6.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/westy92/html-pdf-chrome/issues/249"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/westy92/html-pdf-chrome"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1339"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T18:55:39Z",
    "nvd_published_at" : null
  }
}