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...
Alias: CVE-2018-1107
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
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-10-19 12:10 UTC (History)
24 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:
Last Closed: 2019-06-08 03:40:16 UTC

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:3917 0 None None None 2021-10-19 12:10:09 UTC

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:


Upstream issue:


External References:


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.

Comment 9 Jason Shepherd 2021-05-07 01:38:18 UTC

In Red Hat Quay the is-my-json-valid library is included as a build time dependency of protractor. It's only used at build time, not at runtime reducing the impact to low.

Comment 10 errata-xmlrpc 2021-10-19 12:10:07 UTC
This issue has been addressed in the following products:

  Red Hat Quay 3

Via RHSA-2021:3917 https://access.redhat.com/errata/RHSA-2021:3917

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