CVE-2019-10790: Taffy TaffyDB Can Allow Access To Vulnerability

HIGH
Advisory Identifier: GHSA-mxhp-79qh-mcx6
CVSS 7.5
CWE-668 CWE-20
Published
Advisory Summary

CVE-2019-10790 is a HIGH (CVSS 7.5) taffydb can allow access to vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting Taffy libraries in the npm ecosystem. The issue involves taffydb can allow access to any data items in the db. Remediation is available in the latest vendor maintenance releases.

CVE-2019-10790 at a Glance

CVE Identifier CVE-2019-10790
GHSA Identifier GHSA-mxhp-79qh-mcx6
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-668: Exposure of Resource to Wrong Sphere
Affected Product Taffy
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2019-10790

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

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

How to Check if You Are Affected

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

npm ls taffy

Analyze the terminal output to locate any version of Taffy 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 taffy 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-668: Exposure of Resource to Wrong Sphere, where the product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. In Taffy, 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

TaffyDB allows attackers to forge adding additional properties into user-input processed by taffy which can allow access to any data items in the DB. Taffy sets an internal index for each data item in its DB. However, it is found that the internal index can be forged by adding additional properties into user-input. If index is found in the query, TaffyDB will ignore other query conditions and directly return the indexed data item. Moreover, the internal index is in an easily-guessable format (e.g., T000002R000001). As such, attackers can use this vulnerability to access any data items in the DB. **Note:** `taffy` and its successor package `taffydb` are not maintained.

CVE-2019-10790 Affected Taffy Versions

2 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
taffy
npm
≤ 2.6.2
taffydb
npm
≤ 2.7.3

References

Frequently Asked Questions

What is CVE-2019-10790?
CVE-2019-10790 is a security vulnerability in Taffy involving TaffyDB can allow access to any data items in the DB under CWE-668: Exposure of Resource to Wrong Sphere.
Which Taffy versions are affected?
Affected versions include releases prior to current release patches across affected packages: taffy, taffydb.
What version fixes CVE-2019-10790?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is taffy affected?
Yes, taffy is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
Is taffydb affected?
Yes, taffydb is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2019-10790?
CVE-2019-10790 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2019-10790?
CVE-2019-10790 is classified under CWE-668: Exposure of Resource to Wrong Sphere (The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.).
How can I check npm dependencies for CVE-2019-10790?
Run the dependency tree command: 'npm ls taffy'. 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-mxhp-79qh-mcx6",
  "modified" : "2023-01-30T19:22:17Z",
  "published" : "2020-02-19T16:43:42Z",
  "aliases" : [ "CVE-2019-10790" ],
  "summary" : "TaffyDB can allow access to any data items in the DB",
  "details" : "TaffyDB allows attackers to forge adding additional properties into user-input processed by taffy which can allow access to any data items in the DB. Taffy sets an internal index for each data item in its DB. However, it is found that the internal index can be forged by adding additional properties into user-input. If index is found in the query, TaffyDB will ignore other query conditions and directly return the indexed data item. Moreover, the internal index is in an easily-guessable format (e.g., T000002R000001). As such, attackers can use this vulnerability to access any data items in the DB. **Note:** `taffy` and its successor package `taffydb` are not maintained.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "taffy"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2.6.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "taffydb"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2.7.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-10790"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-TAFFY-546521"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/taffy"
  }, {
    "type" : "PACKAGE",
    "url" : "https://www.npmjs.com/package/taffydb"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20", "CWE-668" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-02-18T20:15:03Z",
    "nvd_published_at" : "2020-02-17T20:15:00Z"
  }
}