CVE-2019-10805: Valib Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-pmpr-vc5q-h3jw
CVSS 7.5
CWE-668
Published
Advisory Summary

CVE-2019-10805 is a MODERATE (CVSS 7.5) remote code execution vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting Valib libraries in the npm ecosystem. The issue involves exposure of resource to wrong sphere in valib. Remediation is available in the latest vendor maintenance releases.

CVE-2019-10805 at a Glance

CVE Identifier CVE-2019-10805
GHSA Identifier GHSA-pmpr-vc5q-h3jw
Severity MODERATE
CVSS v3.1 Base Score 7.5
CWE Classification CWE-668: Exposure of Resource to Wrong Sphere
Affected Product Valib
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:N/I:H/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 None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2019-10805

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

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

How to Check if You Are Affected

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

npm ls valib

Analyze the terminal output to locate any version of Valib 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 valib 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 Valib, 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

valib through 2.0.0 allows Internal Property Tampering. A maliciously crafted JavaScript object can bypass several inspection functions provided by valib. Valib uses a built-in function (hasOwnProperty) from the unsafe user-input to examine an object. It is possible for a crafted payload to overwrite this function to manipulate the inspection results to bypass security checks.

CVE-2019-10805 Affected Valib Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
valib
npm
≤ 2.0.0

References

Frequently Asked Questions

What is CVE-2019-10805?
CVE-2019-10805 is a security vulnerability in Valib involving Exposure of Resource to Wrong Sphere in valib under CWE-668: Exposure of Resource to Wrong Sphere.
Which Valib versions are affected?
Affected versions include releases prior to current release patches across affected packages: valib.
What version fixes CVE-2019-10805?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is valib affected?
Yes, valib 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-10805?
CVE-2019-10805 has a CVSS v3.1 base score of 7.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2019-10805?
CVE-2019-10805 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-10805?
Run the dependency tree command: 'npm ls valib'. 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-pmpr-vc5q-h3jw",
  "modified" : "2021-04-09T22:21:38Z",
  "published" : "2021-04-13T15:21:59Z",
  "aliases" : [ "CVE-2019-10805" ],
  "summary" : "Exposure of Resource to Wrong Sphere in valib",
  "details" : "valib through 2.0.0 allows Internal Property Tampering. A maliciously crafted JavaScript object can bypass several inspection functions provided by valib. Valib uses a built-in function (hasOwnProperty) from the unsafe user-input to examine an object. It is possible for a crafted payload to overwrite this function to manipulate the inspection results to bypass security checks.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "valib"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-10805"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-VALIB-559015"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/valib"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-668" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-04-09T22:21:38Z",
    "nvd_published_at" : "2020-02-28T21:15:00Z"
  }
}