Skip to content

Update dependency moment to v2.29.4 [SECURITY] - #403

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-moment-vulnerability
Open

Update dependency moment to v2.29.4 [SECURITY]#403
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-moment-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Apr 24, 2022

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
moment (source) 2.29.12.29.4 age confidence

Path Traversal: 'dir/../../filename' in moment.locale

CVE-2022-24785 / GHSA-8hfj-j24r-96c4

More information

Details

Impact

This vulnerability impacts npm (server) users of moment.js, especially if user provided locale string, eg fr is directly used to switch moment locale.

Patches

This problem is patched in 2.29.2, and the patch can be applied to all affected versions (from 1.0.1 up until 2.29.1, inclusive).

Workarounds

Sanitize user-provided locale name before passing it to moment.js.

References

Are there any links users can visit to find out more?

For more information

If you have any questions or comments about this advisory:

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Moment.js vulnerable to Inefficient Regular Expression Complexity

CVE-2022-31129 / GHSA-wc69-rhjr-hc9g

More information

Details

Impact
  • using string-to-date parsing in moment (more specifically rfc2822 parsing, which is tried by default) has quadratic (N^2) complexity on specific inputs
  • noticeable slowdown is observed with inputs above 10k characters
  • users who pass user-provided strings without sanity length checks to moment constructor are vulnerable to (Re)DoS attacks
Patches

The problem is patched in 2.29.4, the patch can be applied to all affected versions with minimal tweaking.

Workarounds

In general, given the proliferation of ReDoS attacks, it makes sense to limit the length of the user input to something sane, like 200 characters or less. I haven't seen legitimate cases of date-time strings longer than that, so all moment users who do pass a user-originating string to constructor are encouraged to apply such a rudimentary filter, that would help with this but also most future ReDoS vulnerabilities.

References

There is an excellent writeup of the issue here: https://github.com/moment/moment/pull/6015#issuecomment-1152961973=

Details

The issue is rooted in the code that removes legacy comments (stuff inside parenthesis) from strings during rfc2822 parsing. moment("(".repeat(500000)) will take a few minutes to process, which is unacceptable.

Severity

  • CVSS Score: 7.5 / 10 (High)
  • Vector String: 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 the GitHub Advisory Database (CC-BY 4.0).


Release Notes

moment/moment (moment)

v2.29.4

Compare Source

  • Release Jul 6, 2022
    • #​6015 [bugfix] Fix ReDoS in preprocessRFC2822 regex

v2.29.3

Compare Source

  • Release Apr 17, 2022

v2.29.2

Compare Source

  • Release Apr 3 2022

Address GHSA-8hfj-j24r-96c4


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot changed the title Update dependency moment to 2.29.2 [SECURITY] Update dependency moment to 2.29.4 [SECURITY] Sep 25, 2022
@renovate
renovate Bot force-pushed the renovate/npm-moment-vulnerability branch from e4d37f0 to b0e8ec9 Compare September 25, 2022 13:58
@renovate renovate Bot changed the title Update dependency moment to 2.29.4 [SECURITY] Update dependency moment to v2.29.4 [SECURITY] Mar 24, 2023
@renovate renovate Bot changed the title Update dependency moment to v2.29.4 [SECURITY] Update dependency moment to 2.29.4 [SECURITY] Mar 24, 2023
@renovate renovate Bot changed the title Update dependency moment to 2.29.4 [SECURITY] Update dependency moment to v2.29.4 [SECURITY] Mar 25, 2023
@renovate renovate Bot changed the title Update dependency moment to v2.29.4 [SECURITY] Update dependency moment to 2.29.4 [SECURITY] Mar 25, 2023
@renovate renovate Bot changed the title Update dependency moment to 2.29.4 [SECURITY] Update dependency moment to v2.29.4 [SECURITY] Mar 25, 2023
@renovate renovate Bot changed the title Update dependency moment to v2.29.4 [SECURITY] Update dependency moment to 2.29.4 [SECURITY] Mar 25, 2023
@renovate renovate Bot changed the title Update dependency moment to 2.29.4 [SECURITY] Update dependency moment to v2.29.4 [SECURITY] Mar 30, 2023
@renovate renovate Bot changed the title Update dependency moment to v2.29.4 [SECURITY] Update dependency moment to v2.29.4 [SECURITY] - autoclosed Apr 29, 2023
@renovate renovate Bot closed this Apr 29, 2023
@renovate
renovate Bot deleted the renovate/npm-moment-vulnerability branch April 29, 2023 03:22
@renovate renovate Bot changed the title Update dependency moment to v2.29.4 [SECURITY] - autoclosed Update dependency moment to v2.29.4 [SECURITY] Apr 29, 2023
@renovate renovate Bot reopened this Apr 29, 2023
@renovate
renovate Bot restored the renovate/npm-moment-vulnerability branch April 29, 2023 06:42
@renovate renovate Bot changed the title Update dependency moment to v2.29.4 [SECURITY] Update dependency moment to 2.29.4 [SECURITY] Apr 29, 2023
@renovate
renovate Bot force-pushed the renovate/npm-moment-vulnerability branch from b0e8ec9 to 0936d0e Compare April 29, 2023 06:47
@renovate renovate Bot changed the title Update dependency moment to 2.29.4 [SECURITY] Update dependency moment to v2.29.4 [SECURITY] May 28, 2023
@renovate renovate Bot changed the title Update dependency moment to v2.29.4 [SECURITY] Update dependency moment to v2.29.4 [SECURITY] - autoclosed Jun 28, 2024
@renovate renovate Bot closed this Jun 28, 2024
@renovate
renovate Bot deleted the renovate/npm-moment-vulnerability branch June 28, 2024 21:37
@renovate renovate Bot changed the title Update dependency moment to v2.29.4 [SECURITY] - autoclosed Update dependency moment to v2.29.4 [SECURITY] Jun 29, 2024
@renovate renovate Bot reopened this Jun 29, 2024
@renovate
renovate Bot restored the renovate/npm-moment-vulnerability branch June 29, 2024 00:28
@renovate
renovate Bot force-pushed the renovate/npm-moment-vulnerability branch from 0936d0e to b85972a Compare June 29, 2024 00:29
@renovate
renovate Bot force-pushed the renovate/npm-moment-vulnerability branch from b85972a to ed173f2 Compare October 24, 2024 11:48
@renovate renovate Bot changed the title Update dependency moment to v2.29.4 [SECURITY] fix(deps): update dependency moment to v2.29.4 [security] Oct 24, 2024
@renovate
renovate Bot force-pushed the renovate/npm-moment-vulnerability branch from ed173f2 to 7cd41ea Compare October 25, 2024 08:29
@renovate renovate Bot changed the title fix(deps): update dependency moment to v2.29.4 [security] fix(deps): update dependency moment to v2.29.4 [security] - autoclosed Mar 27, 2026
@renovate renovate Bot closed this Mar 27, 2026
@renovate
renovate Bot deleted the renovate/npm-moment-vulnerability branch March 27, 2026 01:44
@renovate renovate Bot changed the title fix(deps): update dependency moment to v2.29.4 [security] - autoclosed fix(deps): update dependency moment to v2.29.4 [security] Mar 30, 2026
@renovate renovate Bot reopened this Mar 30, 2026
@renovate
renovate Bot force-pushed the renovate/npm-moment-vulnerability branch 2 times, most recently from 7cd41ea to b02be51 Compare March 30, 2026 17:44
@renovate renovate Bot changed the title fix(deps): update dependency moment to v2.29.4 [security] Update dependency moment to v2.29.4 [SECURITY] Apr 8, 2026
@renovate renovate Bot changed the title Update dependency moment to v2.29.4 [SECURITY] Update dependency moment to v2.29.4 [SECURITY] - autoclosed Apr 27, 2026
@renovate renovate Bot closed this Apr 27, 2026
@renovate renovate Bot changed the title Update dependency moment to v2.29.4 [SECURITY] - autoclosed Update dependency moment to v2.29.4 [SECURITY] Apr 28, 2026
@renovate renovate Bot reopened this Apr 28, 2026
@renovate
renovate Bot force-pushed the renovate/npm-moment-vulnerability branch 2 times, most recently from b02be51 to f914830 Compare April 28, 2026 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants