CVE-2018-1107: Is my json valid Denial of Service Vulnerability
MODERATECVE-2018-1107 is a MODERATE (CVSS 5.3) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Is my json valid libraries in the npm ecosystem. The issue involves regular expression deinal of service (redos) in is-my-json-valid. Remediation is available by upgrading affected packages to version 2.17.2, 1.4.1.
CVE-2018-1107 at a Glance
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:N/A:L).
How to Fix CVE-2018-1107
To remediate this vulnerability, upgrade all affected Is my json valid dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install is-my-json-valid@2.17.2
npm install is-my-json-valid@1.4.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls is-my-json-valid
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2018-1107, inspect your project dependencies using npm:
npm ls is-my-json-valid
Analyze the terminal output to locate any version of Is my json valid in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.17.2), your application is affected.
Note: The npm ls is-my-json-valid 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Is my json valid, 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
CVE-2018-1107 Affected Is my json valid Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
is-my-json-valid
|
npm |
≥ 2.0.0
< 2.17.2
|
2.17.2
|
|
is-my-json-valid
|
npm |
< 1.4.1
|
1.4.1
|
References
Frequently Asked Questions
What is CVE-2018-1107?
Which Is my json valid versions are affected?
What version fixes CVE-2018-1107?
Is is-my-json-valid affected?
What is the CVSS score of CVE-2018-1107?
What CWE is associated with CVE-2018-1107?
How can I check npm dependencies for CVE-2018-1107?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4hpf-3wq7-5rpr",
"modified" : "2021-04-23T20:09:28Z",
"published" : "2022-01-06T20:44:07Z",
"aliases" : [ "CVE-2018-1107" ],
"summary" : "Regular expression deinal of service (ReDoS) in is-my-json-valid",
"details" : "It was discovered that the is-my-json-valid JavaScript library used an inefficient regular expression to validate JSON fields defined to have email format. A specially crafted JSON file could cause it to consume an excessive amount of CPU time when validated.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "is-my-json-valid"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.17.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "is-my-json-valid"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.4.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-1107"
}, {
"type" : "WEB",
"url" : "https://github.com/mafintosh/is-my-json-valid/pull/159"
}, {
"type" : "WEB",
"url" : "https://github.com/mafintosh/is-my-json-valid/commit/b3051b277f7caa08cd2edc6f74f50aeda65d2976"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1546357"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/npm:is-my-json-valid:20180214"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-03-31T21:45:17Z",
"nvd_published_at" : "2021-03-30T02:15:00Z"
}
}