CVE-2019-19507: Jpv Validation Bypass Is Possible Vulnerability

MODERATE
Advisory Identifier: GHSA-rh46-3fgc-mvrf
CVSS 5.3
CWE-287
Published
Advisory Summary

CVE-2019-19507 is a MODERATE (CVSS 5.3) validation bypass is possible vulnerability (CWE-287: Improper Authentication) affecting Jpv libraries in the npm ecosystem. The issue involves validation bypass is possible in json pattern validator. Remediation is available by upgrading affected packages to version 2.1.1.

CVE-2019-19507 at a Glance

CVE Identifier CVE-2019-19507
GHSA Identifier GHSA-rh46-3fgc-mvrf
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-287: Improper Authentication
Affected Product Jpv
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.3

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:L/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 Low (I:L)
Availability None (A:N)

How to Fix CVE-2019-19507

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

jpv fixed: 2.1.1
npm install jpv@2.1.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 jpv

How to Check if You Are Affected

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

npm ls jpv

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

Note: The npm ls jpv 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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Jpv, 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

In jpv (aka Json Pattern Validator) before 2.1.1, compareCommon() can be bypassed because certain internal attributes can be overwritten via a conflicting name, as demonstrated by 'constructor': {'name':'Array'}. This affects validate(). Hence, a crafted payload can overwrite this builtin attribute to manipulate the type detection result.

CVE-2019-19507 Affected Jpv Versions

1 component(s)
Fixed Versions:
2.1.1
Product / Package Ecosystem Affected Versions Fixed Version
jpv
npm
< 2.1.1
2.1.1

References

Frequently Asked Questions

What is CVE-2019-19507?
CVE-2019-19507 is a security vulnerability in Jpv involving Validation bypass is possible in Json Pattern Validator under CWE-287: Improper Authentication.
Which Jpv versions are affected?
Affected versions include releases prior to 2.1.1 across affected packages: jpv.
What version fixes CVE-2019-19507?
Upgrading to 2.1.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jpv affected?
Yes, jpv is affected in releases prior to 2.1.1. Upgrade your dependency to 2.1.1 or later.
What is the CVSS score of CVE-2019-19507?
CVE-2019-19507 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2019-19507?
CVE-2019-19507 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check npm dependencies for CVE-2019-19507?
Run the dependency tree command: 'npm ls jpv'. 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-rh46-3fgc-mvrf",
  "modified" : "2021-08-19T16:05:30Z",
  "published" : "2019-12-04T21:25:28Z",
  "aliases" : [ "CVE-2019-19507" ],
  "summary" : "Validation bypass is possible in Json Pattern Validator",
  "details" : "In jpv (aka Json Pattern Validator) before 2.1.1, compareCommon() can be bypassed because certain internal attributes can be overwritten via a conflicting name, as demonstrated by 'constructor': {'name':'Array'}. This affects validate(). Hence, a crafted payload can overwrite this builtin attribute to manipulate the type detection result.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "jpv"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.1.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-19507"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/manvel-khnkoyan/jpv/issues/6"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/jpv"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2019-12-04T19:47:26Z",
    "nvd_published_at" : null
  }
}