CVE-2016-10561: Bitty Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-f5mh-hq6h-whxv
CWE-22
Published
Advisory Summary

CVE-2016-10561 is a MODERATE path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Bitty libraries in the npm ecosystem. The issue involves directory traversal in bitty. Remediation is available in the latest vendor maintenance releases.

CVE-2016-10561 at a Glance

CVE Identifier CVE-2016-10561
GHSA Identifier GHSA-f5mh-hq6h-whxv
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Bitty
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2016-10561

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

bitty fixed: Latest secure release
npm install bitty@Latest secure release
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 bitty

How to Check if You Are Affected

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

npm ls bitty

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

Note: The npm ls bitty 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Bitty, 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

Affected versions of `bitty` are vulnerable to directory traversal via the URL path in GET requests. ## Recommendation The `bitty` package is not currently maintained, and has not seen an update since 2015. At this time, the best available mitigation is to use an alternative module that is actively maintained and provides similar functionality, such as [serve](https://www.npmjs.com/package/serve).

CVE-2016-10561 Affected Bitty Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
bitty
npm
≤ 0.2.10

References

Frequently Asked Questions

What is CVE-2016-10561?
CVE-2016-10561 is a security vulnerability in Bitty involving Directory Traversal in bitty under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Bitty versions are affected?
Affected versions include releases prior to current release patches across affected packages: bitty.
What version fixes CVE-2016-10561?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is bitty affected?
Yes, bitty is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2016-10561?
CVE-2016-10561 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check npm dependencies for CVE-2016-10561?
Run the dependency tree command: 'npm ls bitty'. 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-f5mh-hq6h-whxv",
  "modified" : "2021-01-08T21:04:46Z",
  "published" : "2019-02-18T23:38:29Z",
  "aliases" : [ "CVE-2016-10561" ],
  "summary" : "Directory Traversal in bitty",
  "details" : "Affected versions of `bitty` are vulnerable to directory traversal via the URL path in GET requests.\n\n\n## Recommendation\n\nThe `bitty` package is not currently maintained, and has not seen an update since 2015. \n\nAt this time, the best available mitigation is to use an alternative module that is actively maintained and provides similar functionality, such as [serve](https://www.npmjs.com/package/serve).",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "bitty"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.2.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-10561"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-f5mh-hq6h-whxv"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/150"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:33:49Z",
    "nvd_published_at" : null
  }
}