CVE-2016-10526: Grunt gh pages Grunt-gh-pages Before 0.10.0 May Allow Vulnerability

MODERATE
Advisory Identifier: GHSA-rrj3-qmh8-72pf
CWE-391
Published
Advisory Summary

CVE-2016-10526 is a MODERATE grunt-gh-pages before 0.10.0 may allow vulnerability (CWE-391: Unchecked Error Condition) affecting Grunt gh pages libraries in the npm ecosystem. The issue involves grunt-gh-pages before 0.10.0 may allow unencrypted github credentials to be written to a log file. Remediation is available by upgrading affected packages to version 0.10.0.

CVE-2016-10526 at a Glance

CVE Identifier CVE-2016-10526
GHSA Identifier GHSA-rrj3-qmh8-72pf
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-391: Unchecked Error Condition
Affected Product Grunt gh pages
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2016-10526

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

grunt-gh-pages fixed: 0.10.0
npm install grunt-gh-pages@0.10.0
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 grunt-gh-pages

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2016-10526, inspect your project dependencies using npm:

npm ls grunt-gh-pages

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

Note: The npm ls grunt-gh-pages 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-391: Unchecked Error Condition, where [planned for deprecation. see maintenance notes and consider cwe-252, cwe-248, or cwe-1069.] ignoring exceptions and other error conditions may allow an attacker to induce unexpected behavior unnoticed. In Grunt gh pages, 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

Versions of `grunt-gh-pages` prior to 0.10.0 are affected by a vulnerability which may cause unencrypted GitHub credentials to be written to a log file in certain circumstances. In the `grunt-gh-pages` deployment scenario where authentication is performed by injecting a GitHub token directly into the auth portion of the URL, `grunt-gh-pages` will write the token to a log file, unencrypted. ## Recommendation Update to version 0.10.0 or later.

CVE-2016-10526 Affected Grunt gh pages Versions

1 component(s)
Fixed Versions:
0.10.0
Product / Package Ecosystem Affected Versions Fixed Version
grunt-gh-pages
npm
< 0.10.0
0.10.0

References

Frequently Asked Questions

What is CVE-2016-10526?
CVE-2016-10526 is a security vulnerability in Grunt gh pages involving grunt-gh-pages before 0.10.0 may allow unencrypted GitHub credentials to be written to a log file under CWE-391: Unchecked Error Condition.
Which Grunt gh pages versions are affected?
Affected versions include releases prior to 0.10.0 across affected packages: grunt-gh-pages.
What version fixes CVE-2016-10526?
Upgrading to 0.10.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is grunt-gh-pages affected?
Yes, grunt-gh-pages is affected in releases prior to 0.10.0. Upgrade your dependency to 0.10.0 or later.
What CWE is associated with CVE-2016-10526?
CVE-2016-10526 is classified under CWE-391: Unchecked Error Condition ([PLANNED FOR DEPRECATION. SEE MAINTENANCE NOTES AND CONSIDER CWE-252, CWE-248, OR CWE-1069.] Ignoring exceptions and other error conditions may allow an attacker to induce unexpected behavior unnoticed.).
How can I check npm dependencies for CVE-2016-10526?
Run the dependency tree command: 'npm ls grunt-gh-pages'. 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-rrj3-qmh8-72pf",
  "modified" : "2022-08-03T23:53:09Z",
  "published" : "2019-02-18T23:39:11Z",
  "aliases" : [ "CVE-2016-10526" ],
  "summary" : "grunt-gh-pages before 0.10.0 may allow unencrypted GitHub credentials to be written to a log file",
  "details" : "Versions of `grunt-gh-pages` prior to 0.10.0 are affected by a vulnerability which may cause unencrypted GitHub credentials to be written to a log file in certain circumstances.\n\nIn the `grunt-gh-pages` deployment scenario where authentication is performed by injecting a GitHub token directly into the auth portion of the URL, `grunt-gh-pages` will write the token to a log file, unencrypted.\n\n\n## Recommendation\n\nUpdate to version 0.10.0 or later.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "grunt-gh-pages"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.10.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.9.1"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-10526"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tschaub/grunt-gh-pages/pull/41"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tschaub/grunt-gh-pages/pull/41/commits/590f69767203d8c379fe18cded93bd5ad6cb53cb"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/tschaub/grunt-gh-pages/commit/2d277e3e969ccd4c2d493f3795400fa77e6b6342"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/tschaub/grunt-gh-pages"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/85"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-391" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:55:45Z",
    "nvd_published_at" : null
  }
}