Bug 1546357 (CVE-2018-1107) - CVE-2018-1107 nodejs-is-my-json-valid: ReDoS when validating JSON fields with email format
Summary: CVE-2018-1107 nodejs-is-my-json-valid: ReDoS when validating JSON fields with...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2018-1107
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1546358 1569186 1598489 1598490
Blocks: 1546360 1944336
TreeView+ depends on / blocked
 
Reported: 2018-02-16 20:56 UTC by Pedro Sampaio
Modified: 2021-03-29 18:41 UTC (History)
22 users (show)

Fixed In Version: is-myjson-valid 2.17.2, is-myjson-valid 1.4.1
Doc Type: If docs needed, set a value
Doc Text:
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.
Clone Of:
Environment:
Last Closed: 2019-06-08 03:40:16 UTC


Attachments (Terms of Use)

Description Pedro Sampaio 2018-02-16 20:56:37 UTC
A flaw was discovered in is-myjson-valid before 1.4.1 and 2.17.2. Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) attacks. It used a regular expression (/^\S+@\S+$/) in order to validate emails. This can cause an impact of about 10 seconds matching time for data 90K characters long.

Upstream patch:

https://github.com/mafintosh/is-my-json-valid/commit/b3051b277f7caa08cd2edc6f74f50aeda65d2976

Upstream issue:

https://github.com/mafintosh/is-my-json-valid/pull/159

External References:

https://snyk.io/vuln/npm:is-my-json-valid:20180214

Comment 1 Pedro Sampaio 2018-02-16 20:58:11 UTC
Created nodejs-is-my-json-valid tracking bugs for this issue:

Affects: fedora-all [bug 1546358]

Comment 4 Jason Shepherd 2018-06-13 21:29:49 UTC
NodeJS is shipped in Openshift Enterprise 3.9 as ImageStreams. Those ImageStreams are the RH Software Collection images. Setting Openshift Enterprise 3 as not affected.


Note You need to log in before you can comment on or make changes to this bug.