Bug 2216475 (CVE-2022-25883) - CVE-2022-25883 nodejs-semver: Regular expression denial of service [NEEDINFO]
Summary: CVE-2022-25883 nodejs-semver: Regular expression denial of service
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2022-25883
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: 2217402 2222507 2222508 2222509 2222510 2222512 2222513 2222518 2222520 2222521 2222525 2222527 2222511 2222514 2222515 2222516 2222517 2222519 2222522 2222523 2222524 2222528 2222529 2222530 2222531 2222532 2222533 2222534 2222535 2222536 2222537 2222538 2222539 2222540 2222541 2222542 2222544 2222545 2222546 2222547 2222548 2222549 2222550 2222551 2222552 2222553 2222561 2222562 2222563 2222564 2222565 2222566 2222567 2222568 2222569 2234408 2234413 2234449 2234450
Blocks: 2216477
TreeView+ depends on / blocked
 
Reported: 2023-06-21 14:38 UTC by ybuenos
Modified: 2024-04-03 03:42 UTC (History)
169 users (show)

Fixed In Version: node-semver 7.5.2, node-semver 6.3.1, node-semver 5.7.2
Doc Type: If docs needed, set a value
Doc Text:
A Regular Expression Denial of Service (ReDoS) vulnerability was discovered in node-semver package via the 'new Range' function. This issue could allow an attacker to pass untrusted malicious regex user data as a range, causing the service to excessively consume CPU depending upon the input size, resulting in a denial of service.
Clone Of:
Environment:
Last Closed: 2023-08-02 18:10:14 UTC
Embargoed:
arturo: needinfo? (meda_teja)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2023:5402 0 None None None 2023-09-28 15:26:48 UTC
Red Hat Product Errata RHBA-2023:5404 0 None None None 2023-09-28 18:27:20 UTC
Red Hat Product Errata RHBA-2023:5409 0 None None None 2023-10-02 08:11:36 UTC
Red Hat Product Errata RHBA-2023:5420 0 None None None 2023-10-03 15:11:29 UTC
Red Hat Product Errata RHSA-2023:4341 0 None None None 2023-08-02 13:49:51 UTC
Red Hat Product Errata RHSA-2023:5360 0 None None None 2023-09-26 14:52:16 UTC
Red Hat Product Errata RHSA-2023:5361 0 None None None 2023-09-26 14:50:44 UTC
Red Hat Product Errata RHSA-2023:5362 0 None None None 2023-09-26 14:58:55 UTC
Red Hat Product Errata RHSA-2023:5363 0 None None None 2023-09-26 14:51:44 UTC
Red Hat Product Errata RHSA-2023:5379 0 None None None 2023-09-28 02:59:59 UTC
Red Hat Product Errata RHSA-2023:5484 0 None None None 2023-10-05 20:21:50 UTC
Red Hat Product Errata RHSA-2023:5485 0 None None None 2023-10-05 20:22:22 UTC
Red Hat Product Errata RHSA-2023:5486 0 None None None 2023-10-05 20:23:34 UTC
Red Hat Product Errata RHSA-2023:5488 0 None None None 2023-10-05 20:18:40 UTC
Red Hat Product Errata RHSA-2023:7222 0 None None None 2023-11-15 01:25:58 UTC
Red Hat Product Errata RHSA-2024:0719 0 None None None 2024-02-07 15:33:21 UTC

Description ybuenos 2023-06-21 14:38:29 UTC
Versions of the package semver before 7.5.2 are vulnerable to Regular Expression Denial of Service (ReDoS) via the function new Range, when untrusted user data is provided as a range.

https://security.snyk.io/vuln/SNYK-JS-SEMVER-3247795
https://github.com/npm/node-semver/pull/564
https://github.com/advisories/GHSA-c2qf-rxjj-qqgw

Comment 1 Sandipan Roy 2023-06-26 07:55:46 UTC
Created nodejs-semver tracking bugs for this issue:

Affects: epel-7 [bug 2217402]

Comment 2 Product Security DevOps Team 2023-06-26 12:04:53 UTC
This CVE Bugzilla entry is for community support informational purposes only as it does not affect a package in a commercially supported Red Hat product. Refer to the dependent bugs for status of those individual community products.

Comment 4 TEJ RATHI 2023-07-13 04:39:56 UTC
Created breeze-icon-theme tracking bugs for this issue:

Affects: epel-all [bug 2222507]
Affects: fedora-all [bug 2222513]


Created cachelib tracking bugs for this issue:

Affects: fedora-all [bug 2222514]


Created fbthrift tracking bugs for this issue:

Affects: fedora-all [bug 2222515]


Created golang-github-prometheus tracking bugs for this issue:

Affects: epel-all [bug 2222508]


Created llhttp tracking bugs for this issue:

Affects: fedora-all [bug 2222516]


Created mozjs78 tracking bugs for this issue:

Affects: fedora-all [bug 2222517]


Created nodejs tracking bugs for this issue:

Affects: fedora-all [bug 2222518]


Created nodejs-bash-language-server tracking bugs for this issue:

Affects: fedora-all [bug 2222519]


Created nodejs:13/nodejs tracking bugs for this issue:

Affects: epel-all [bug 2222509]


Created nodejs:16-epel/nodejs tracking bugs for this issue:

Affects: epel-all [bug 2222510]


Created nodejs:16/nodejs tracking bugs for this issue:

Affects: fedora-all [bug 2222520]


Created nodejs:18/nodejs tracking bugs for this issue:

Affects: fedora-all [bug 2222521]


Created pgadmin4 tracking bugs for this issue:

Affects: fedora-all [bug 2222522]


Created rstudio tracking bugs for this issue:

Affects: fedora-all [bug 2222523]


Created seamonkey tracking bugs for this issue:

Affects: epel-all [bug 2222511]
Affects: fedora-all [bug 2222524]


Created yarnpkg tracking bugs for this issue:

Affects: epel-all [bug 2222512]
Affects: fedora-all [bug 2222525]

Comment 16 errata-xmlrpc 2023-08-02 13:49:42 UTC
This issue has been addressed in the following products:

  RHOL-5.7-RHEL-8

Via RHSA-2023:4341 https://access.redhat.com/errata/RHSA-2023:4341

Comment 17 Product Security DevOps Team 2023-08-02 18:10:04 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2022-25883

Comment 18 arturo 2023-08-31 17:20:46 UTC
@

Comment 19 arturo 2023-08-31 17:23:50 UTC
@trathi I see a comment here: "This CVE Bugzilla entry is for community support informational purposes only as it does not affect a package in a commercially supported Red Hat product. Refer to the dependent bugs for status of those individual community products." But then I see online that this CVE includes many commercial redhat products: https://access.redhat.com/security/cve/cve-2022-25883 Specifically I'm interested in RHEL8 distributions. Is there any work in progress to remediate this?

Comment 20 TEJ RATHI 2023-09-01 08:30:45 UTC
In reply to comment #19:
> @trathi I see a comment here: "This CVE Bugzilla entry is for
> community support informational purposes only as it does not affect a
> package in a commercially supported Red Hat product. Refer to the dependent
> bugs for status of those individual community products." But then I see
> online that this CVE includes many commercial redhat products:
> https://access.redhat.com/security/cve/cve-2022-25883 Specifically I'm
> interested in RHEL8 distributions. Is there any work in progress to
> remediate this?

Hey, not really. That comment was auto-generated just because - there were only community products (fedora, and epel) added to this CVE, and bugzilla prodsec bot auto closed it, thinking that this only affects community products. But, later, we added Red Hat Products which were affected by this CVE and the bug was reopened. And, for rhel distributions, yes fixes are in progress.

Comment 21 arturo 2023-09-25 21:16:19 UTC
@trathi Any eta on this?

Comment 22 TEJ RATHI 2023-09-26 13:45:12 UTC
In reply to comment #21:
> @trathi Any eta on this?

Some updates for RHEL-8 will be out soon (By the end of this week or early next week).

Comment 23 errata-xmlrpc 2023-09-26 14:50:34 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Extended Update Support

Via RHSA-2023:5361 https://access.redhat.com/errata/RHSA-2023:5361

Comment 24 errata-xmlrpc 2023-09-26 14:51:35 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2023:5363 https://access.redhat.com/errata/RHSA-2023:5363

Comment 25 errata-xmlrpc 2023-09-26 14:52:06 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2023:5360 https://access.redhat.com/errata/RHSA-2023:5360

Comment 26 errata-xmlrpc 2023-09-26 14:58:48 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2023:5362 https://access.redhat.com/errata/RHSA-2023:5362

Comment 27 arturo 2023-09-26 16:53:05 UTC
Thanks for addressing this!

Comment 28 errata-xmlrpc 2023-09-28 02:59:51 UTC
This issue has been addressed in the following products:

  NETWORK-OBSERVABILITY-1.4.0-RHEL-9

Via RHSA-2023:5379 https://access.redhat.com/errata/RHSA-2023:5379

Comment 29 arturo 2023-10-04 20:55:45 UTC
@trathi The RedHat CVE report (https://access.redhat.com/security/cve/CVE-2022-25883) says this bug is fixed but when I look at the following images, the semver package is still vulnerable:

$ docker run -it -u root --rm registry.access.redhat.com/ubi8/nodejs-16-minimal bash
bash-4.4# cat /usr/lib/node_modules/npm/node_modules/semver/package.json | grep -A1 semver    
  "name": "semver",
  "version": "7.3.7",

$ docker run -it -u root --rm registry.access.redhat.com/ubi8/nodejs-18-minimal bash
bash-4.4# cat /usr/lib/node_modules/npm/node_modules/semver/package.json | grep -A1 semver 
  "name": "semver",
  "version": "7.5.1",

It's the same for the node 16/18 UBI9 images as well.

Comment 30 Laurie Morse 2023-10-05 00:52:34 UTC
I have also seen the semver at the levels above.  Do we know when it will be fixed?

Comment 31 errata-xmlrpc 2023-10-05 20:18:33 UTC
This issue has been addressed in the following products:

  EAP 7.4.13

Via RHSA-2023:5488 https://access.redhat.com/errata/RHSA-2023:5488

Comment 32 errata-xmlrpc 2023-10-05 20:21:42 UTC
This issue has been addressed in the following products:

  Red Hat JBoss Enterprise Application Platform 7.4 on RHEL 7

Via RHSA-2023:5484 https://access.redhat.com/errata/RHSA-2023:5484

Comment 33 errata-xmlrpc 2023-10-05 20:22:13 UTC
This issue has been addressed in the following products:

  Red Hat JBoss Enterprise Application Platform 7.4 for RHEL 8

Via RHSA-2023:5485 https://access.redhat.com/errata/RHSA-2023:5485

Comment 34 errata-xmlrpc 2023-10-05 20:23:27 UTC
This issue has been addressed in the following products:

  Red Hat JBoss Enterprise Application Platform 7.4 for RHEL 9

Via RHSA-2023:5486 https://access.redhat.com/errata/RHSA-2023:5486

Comment 35 arturo 2023-10-30 17:25:45 UTC
@trathi any update on my comment above: https://bugzilla.redhat.com/show_bug.cgi?id=2216475#c29 ? The CVE https://access.redhat.com/security/cve/cve-2022-25883 says this is fixed in those images but the vulnerability is still showing up.

Comment 36 errata-xmlrpc 2023-11-15 01:25:49 UTC
This issue has been addressed in the following products:

  Red Hat Migration Toolkit for Containers 1.8

Via RHSA-2023:7222 https://access.redhat.com/errata/RHSA-2023:7222

Comment 37 errata-xmlrpc 2024-02-07 15:33:12 UTC
This issue has been addressed in the following products:

  Migration Toolkit for Runtimes 1 on RHEL 8

Via RHSA-2024:0719 https://access.redhat.com/errata/RHSA-2024:0719

Comment 38 Paramvir jindal 2024-04-03 03:41:16 UTC
Marking EAP-8 as not affected because EAP 8 GA was released with the fixed version of nodejs-semver.


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