Skip to content

chore(deps): update dependency moment to v2.29.4 [security] - #204

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

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

Conversation

@renovate

@renovate renovate Bot commented Nov 26, 2025 •

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
moment 2.22.1 → 2.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).


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 OSV and 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 OSV and the GitHub Advisory Database (CC-BY 4.0).


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: Never, 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 force-pushed the renovate-npm-moment-vulnerability branch from 1fac1e4 to 3e47c4b Compare January 21, 2026 15:18
@renovate
renovate Bot force-pushed the renovate-npm-moment-vulnerability branch from 3e47c4b to ed1e71c Compare February 13, 2026 19:18
@renovate
renovate Bot force-pushed the renovate-npm-moment-vulnerability branch from ed1e71c to 815409d Compare March 13, 2026 11:47
@renovate renovate Bot changed the title chore(deps): update dependency moment to v2.29.4 [security] Update dependency moment to v2.29.4 [SECURITY] Apr 8, 2026
@renovate
renovate Bot force-pushed the renovate-npm-moment-vulnerability branch from 815409d to c97a246 Compare April 29, 2026 09:51
@renovate
renovate Bot force-pushed the renovate-npm-moment-vulnerability branch from c97a246 to 3598f17 Compare May 12, 2026 15:14
@renovate renovate Bot changed the title Update dependency moment to v2.29.4 [SECURITY] Update dependency moment to v2.29.4 [SECURITY] - autoclosed May 26, 2026
@renovate renovate Bot closed this May 26, 2026
@renovate
renovate Bot deleted the renovate-npm-moment-vulnerability branch May 26, 2026 23:00
@renovate renovate Bot changed the title Update dependency moment to v2.29.4 [SECURITY] - autoclosed Update dependency moment to v2.29.4 [SECURITY] May 27, 2026
@renovate renovate Bot reopened this May 27, 2026
@renovate
renovate Bot force-pushed the renovate-npm-moment-vulnerability branch 2 times, most recently from 3598f17 to 05d942e Compare May 27, 2026 00:48
@renovate
renovate Bot force-pushed the renovate-npm-moment-vulnerability branch from 05d942e to 26bce9a Compare July 12, 2026 10:35
@renovate renovate Bot changed the title Update dependency moment to v2.29.4 [SECURITY] Update dependency moment to v2.29.4 [SECURITY] - autoclosed Jul 20, 2026
@renovate renovate Bot closed this Jul 20, 2026
@renovate renovate Bot changed the title Update dependency moment to v2.29.4 [SECURITY] - autoclosed Update dependency moment to v2.29.4 [SECURITY] Jul 20, 2026
@renovate renovate Bot reopened this Jul 20, 2026
@renovate
renovate Bot force-pushed the renovate-npm-moment-vulnerability branch 2 times, most recently from 26bce9a to c7e6e67 Compare July 20, 2026 22:46
@renovate renovate Bot changed the title Update dependency moment to v2.29.4 [SECURITY] Update dependency moment to v2.29.4 [SECURITY] - autoclosed Aug 12, 2026
@renovate renovate Bot closed this Aug 12, 2026
@renovate renovate Bot changed the title Update dependency moment to v2.29.4 [SECURITY] - autoclosed Update dependency moment to v2.29.4 [SECURITY] Aug 12, 2026
@renovate renovate Bot reopened this Aug 12, 2026
@renovate
renovate Bot force-pushed the renovate-npm-moment-vulnerability branch 2 times, most recently from c7e6e67 to ea4e7c3 Compare August 12, 2026 23:19
@renovate renovate Bot changed the title Update dependency moment to v2.29.4 [SECURITY] chore(deps): update dependency moment to v2.29.4 [security] Aug 25, 2026
@renovate
renovate Bot force-pushed the renovate-npm-moment-vulnerability branch from ea4e7c3 to 25e8708 Compare August 26, 2026 21:17
@renovate
renovate Bot force-pushed the renovate-npm-moment-vulnerability branch from 25e8708 to 4206af4 Compare September 7, 2026 22:36
@renovate
renovate Bot force-pushed the renovate-npm-moment-vulnerability branch from 4206af4 to 41d5d33 Compare September 15, 2026 20:50
@renovate
renovate Bot force-pushed the renovate-npm-moment-vulnerability branch from 41d5d33 to 3738689 Compare September 24, 2026 23:44

This branch has not been deployed

No deployments
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