-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(deps): update dependency parse-duration to v2 #10
base: main
Are you sure you want to change the base?
fix(deps): update dependency parse-duration to v2 #10
Conversation
Signed-off-by: mend-on-mend[bot] <mend-on-mend[bot]@users.noreply.github.com>
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
This PR contains the following updates:
^1.1.0
->^2.0.0
parse-duration has a Regex Denial of Service that results in event loop delay and out of memory
CVE-2025-25283 / GHSA-hcrg-fc28-fcg5
More information
Details
Summary
This report finds 2 availability issues due to the regex used in the
parse-duration
npm package:PoC
Refer to the following proof of concept code that provides a test case and makes use of the regular expression in the library as its test case to match against strings:
The results of this on the cloud machine that I ran this on are as follows:
You can note that:
parse()
functionHowever, more interestingly, if we focus on the input string case:
Even though this is merely 10 MB of size (9.97 MB) it results in an out of memory issue due to the recursive nature of the regular expression matching:
To note, the issue at hand may not just be the primary regex in use but rather the reliance of the various
replace
functions in theparse()
function which create copies of the input in memory.Impact
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
References
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
jkroso/parse-duration (parse-duration)
v2.1.3
Compare Source
What's Changed
Full Changelog: jkroso/parse-duration@v2.1.2...v2.1.3
v2.1.2
Compare Source
What's Changed
mo
,mth
,microsec
,nanosec
b
abbrμ
as greek mu in favor ofµ
left in default setFull Changelog: jkroso/parse-duration@v2.1.1...v2.1.2
v2.1.1
Compare Source
v2.1.0
Compare Source
v2.0.2
Compare Source
v2.0.1
Compare Source
v2.0.0
Compare Source
parse.unit
object #56v1.1.2
Compare Source
What's Changed
null
instead ofundefined
by @Mykhailo-Sichkaruk in https://github.com/jkroso/parse-duration/pull/53New Contributors
Full Changelog: jkroso/parse-duration@v0.4.0...v1.1.2
v1.1.1
Compare Source
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
disabled