Skip to content
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

[Security] Bump moment from 2.10.3 to 2.24.0 in /ghost #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot-preview[bot]
Copy link

Bumps moment from 2.10.3 to 2.24.0. This update includes security fixes.

Vulnerabilities fixed

Sourced from The GitHub Security Advisory Database.

Moderate severity vulnerability that affects moment
The moment module before 2.19.3 for Node.js is prone to a regular expression denial of service via a crafted date string, a different vulnerability than CVE-2016-4055.

Affected versions: < 2.19.3

Sourced from The Node Security Working Group.

Regular Expression Denial of Service
moment is vulnerable to regular expression denial of service when user input is passed unchecked into moment.duration() blocking the event loop for a period of time.

"The Regular expression Denial of Service (ReDoS) is a Denial of Service attack, that exploits the fact that most Regular Expression implementations may reach extreme situations that cause them to work very slowly (exponentially related to input size). An attacker can then cause a program using a Regular Expression to enter these extreme situations and then hang for a very long time." [1]

It's not a huge amplification it takes about 25k characters to get 1.1 seconds however that's well under most servers max request size so it's certainly exploitable.

The regular expression in question

moment/2.10.6/moment.js

1679     var aspNetRegex = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/;

Proof of concept

var moment = require('moment');

var genstr = function (len, chr) {
    var result = "";
</tr></table> ... (truncated)

Affected versions: <2.11.2
Changelog

Sourced from moment's changelog.

2.24.0 See full changelog

  • Release Jan 21, 2019

  • #4338 [bugfix] Fix startOf/endOf DST issues while boosting performance

  • #4553 [feature] Add localeSort param to Locale weekday methods

  • #4887 [bugfix] Make Duration#as work with quarters

  • 3 new locales (it-ch, ga, en-SG)

  • Lots of locale improvements

2.23.0 See full changelog

  • Release Dec 12, 2018

  • #4863 [new locale] added Kurdish language (ku)

  • #4417 [bugfix] isBetween should return false for invalid dates

  • #4700 [bugfix] Fix #4698: Use ISO WeekYear for HTML5_FMT.WEEK

  • #4563 [feature] Fix #4518: Add support to add/subtract ISO weeks

  • other locale changes, build process changes, typos

2.22.2 See full changelog

  • Release May 31, 2018

  • #4564 [bugfix] Avoid using trim()

  • #4453 [bugfix] Treat periods as periods, not regex-anything period, for weekday parsing in strict mode.

  • Minor locale improvements (pa-in, be, az)

2.22.1 See full changelog

  • Release Apr 14, 2018

  • #4495 [bugfix] Added HTML5_FMT to moment.d.ts

  • Minor locale improvements

  • QUnit upgrade and coveralls reporting

2.22.0 See full changelog

  • Release Mar 30, 2018

  • #4423 [new locale] Added Mongolian locale mn

  • Various locale improvements

  • Minor misc changes

2.21.0 See full changelog

  • Release Mar 2, 2018

  • #4391 [bugfix] Fix #4390: use offset properly in toISOString

  • #4310 [bugfix] Fix #3883 lazy load parentLocale in defineLocale, fallback to global if missing

... (truncated)
Commits
  • 96d0d67 Build 2.24.0
  • f57faac Bump version to 2.24.0
  • 7eb0ea8 Update changelog for 2.24.0
  • 38a19a7 [locale] fo: Fixed relativeTimes for m and M (#4609) (#4682)
  • 01ae8ca [misc] Remove unused variable defaults (#4959)
  • 24e55df [locale] Extend cs locale with name of the months in genitive (#4771)
  • 3b80f6a [feature] Add localeSort param to Locale weekday methods (#4553)
  • bb484bc [locale] (es-us) long date is D [de] MMMM [de] YYYY (#4954)
  • ba125e7 [bugfix] (TypeScript) allow update of a single relativeTime handler
  • 91550f8 [locale] Capitalization of pt month names (#4557)
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by marwahaha, a new releaser for moment since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking Bump now in your Dependabot dashboard.

Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.


Dependabot has been acquired by GitHub  🎉

@dependabot-preview dependabot-preview bot added dependencies Pull requests that update a dependency file security Pull requests that address a security vulnerability labels May 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file security Pull requests that address a security vulnerability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants