ant-design-vue icon indicating copy to clipboard operation
ant-design-vue copied to clipboard

chore(deps): update dependency marked to v4 [security]

Open renovate[bot] opened this issue 3 years ago β€’ 1 comments

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
marked (source) 0.3.18 -> 4.0.10 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2022-21681

Impact

What kind of vulnerability is it?

Denial of service.

The regular expression inline.reflinkSearch may cause catastrophic backtracking against some strings. PoC is the following.

import * as marked from 'marked';

console.log(marked.parse(`[x]: x

\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](\\[\\](`));

Who is impacted?

Anyone who runs untrusted markdown through marked and does not use a worker with a time limit.

Patches

Has the problem been patched?

Yes

What versions should users upgrade to?

4.0.10

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?

Do not run untrusted markdown through marked or run marked on a worker thread and set a reasonable time limit to prevent draining resources.

References

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

  • https://marked.js.org/using_advanced#workers
  • https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS

For more information

If you have any questions or comments about this advisory:

CVE-2022-21680

Impact

What kind of vulnerability is it?

Denial of service.

The regular expression block.def may cause catastrophic backtracking against some strings. PoC is the following.

import * as marked from "marked";

marked.parse(`[x]:${' '.repeat(1500)}x ${' '.repeat(1500)} x`);

Who is impacted?

Anyone who runs untrusted markdown through marked and does not use a worker with a time limit.

Patches

Has the problem been patched?

Yes

What versions should users upgrade to?

4.0.10

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?

Do not run untrusted markdown through marked or run marked on a worker thread and set a reasonable time limit to prevent draining resources.

References

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

  • https://marked.js.org/using_advanced#workers
  • https://owasp.org/www-community/attacks/Regular_expression_Denial_of_Service_-_ReDoS

For more information

If you have any questions or comments about this advisory:

GHSA-xf5p-87ch-gxw2

Versions of marked from 0.3.14 until 0.6.2 are vulnerable to Regular Expression Denial of Service. Email addresses may be evaluated in quadratic time, allowing attackers to potentially crash the node process due to resource exhaustion.

Recommendation

Upgrade to version 0.6.2 or later.


Release Notes

markedjs/marked

v4.0.10

Compare Source

Bug Fixes
  • security: fix redos vulnerabilities (8f80657)

v4.0.9

Compare Source

Bug Fixes

v4.0.8

Compare Source

Bug Fixes

v4.0.7

Compare Source

Bug Fixes

v4.0.6

Compare Source

Bug Fixes

v4.0.5

Compare Source

Bug Fixes

v4.0.4

Compare Source

Bug Fixes

v4.0.3

Compare Source

Bug Fixes

v4.0.2

Compare Source

Bug Fixes

v4.0.1

Compare Source

Bug Fixes

v4.0.0

Compare Source

Bug Fixes
BREAKING CHANGES
  • Default export removed. Use import { marked } from 'marked' or const { marked } = require('marked') instead.
  • /lib/marked.js removed. Use /marked.min.js in script tag instead.
  • When using marked in a script tag use marked.parse(...) instead of marked(...)

v3.0.8

Compare Source

Bug Fixes

v3.0.7

Compare Source

Bug Fixes

v3.0.6

Compare Source

Bug Fixes

v3.0.5

Compare Source

Bug Fixes

v3.0.4

Compare Source

Bug Fixes

v3.0.3

Compare Source

Bug Fixes

v3.0.2

Compare Source

Bug Fixes

v3.0.1

Compare Source

Bug Fixes

v3.0.0

Compare Source

Bug Fixes
BREAKING CHANGES
  • Drop support for node 10.
  • Add module field to package.json

  • Tokenizers will create their own tokens with this.lexer.inline(text, tokens). The inline function will queue the token creation until after all block tokens are created.
  • Extensions tokenizer this object will include the lexer as a property. this.inlineTokens becomes this.lexer.inline.
  • Extensions renderer this object will include the parser as a property. this.parseInline becomes this.parser.parseInline.
  • tag and inlineText tokenizer function signatures have changed.

  • nptable tokenizer is removed and merged with table tokenizer.
  • table tokens header property changed to contain an array of objects for each header cell with text and tokens properties.
  • table tokens cells property changed to rows and is an array of rows where each row contains an array of objects for each cell with text and tokens properties.

v2 table token:

{
  "type": "table",
  "align": [null, null],
  "raw": "| a | b |\n|---|---|\n| 1 | 2 |\n",
  "header": ["a", "b"],
  "cells": [["1", "2"]],
  "tokens": {
    "header": [
      [{ "type": "text", "raw": "a", "text": "a" }],
      [{ "type": "text", "raw": "b", "text": "b" }]
    ],
    "cells": [[
      [{ "type": "text", "raw": "1", "text": "1" }],
      [{ "type": "text", "raw": "2", "text": "2" }]
    ]]
  }
}

v3 table token:

{
  "type": "table",
  "align": [null, null],
  "raw": "| a | b |\n|---|---|\n| 1 | 2 |\n",
  "header": [
    {
      "text": "a",
      "tokens": [{ "type": "text", "raw": "a", "text": "a" }]
    },
    {
      "text": "b",
      "tokens": [{ "type": "text", "raw": "b", "text": "b" }]
    }
  ],
  "rows": [
    {
      "text": "1",
      "tokens": [{ "type": "text", "raw": "1", "text": "1" }]
    },
    {
      "text": "2",
      "tokens": [{ "type": "text", "raw": "2", "text": "2" }]
    }
  ]
}

v2.1.3

Compare Source

Bug Fixes

v2.1.2

Compare Source

Bug Fixes

v2.1.1

Compare Source

Bug Fixes

v2.1.0

Compare Source

Features

v2.0.7

Compare Source

Bug Fixes

v2.0.6

Compare Source

Bug Fixes

v2.0.5

Compare Source

Bug Fixes

v2.0.4

Compare Source

Bug Fixes

v2.0.3

Compare Source

Bug Fixes

v2.0.2

Compare Source

Bug Fixes

v2.0.1

Compare Source

Bug Fixes

v2.0.0

Compare Source

Bug Fixes
BREAKING CHANGES
  • em and strong tokenizers have been merged into one emStrong tokenizer.
  • code and text tokenizers do not get passed all tokens as a second parameter.
  • No longer supporting IE 11. IE 11 may still work but we are not committed to making sure it works with every update. We still provide an es5 version in lib/marked.js but some pollyfills may be needed for IE 11 in the future.

v1.2.9

Compare Source

Bug Fixes

v1.2.8

Compare Source

Bug Fixes

v1.2.7

Compare Source

Bug Fixes

v1.2.6

Compare Source

Bug Fixes
  • fix atx heading and make regex safe (#​1853) (70ee29c) possible breaking change: When using the block.heading rule the text provided in capture group 2 will not be trimmed of whitespace.
  • fix link with angle brackets around href (#​1851) (656c3e4)

v1.2.5

Compare Source

Bug Fixes

v1.2.4

Compare Source

Bug Fixes

Possible Breaking Change: When using the inline.del rule the text is provided in capture group 2 instead of 1.

v1.2.3

Compare Source

Bug Fixes

v1.2.2

Compare Source

Bug Fixes

v1.2.1

Compare Source

re-release of v 1.1.2 since semantic release picked up the wrong version

v1.2.0

Compare Source

Features

Fixes

Dependencies

Documentation

  • Add api dingus for babelmark #​1742
  • Update docs to use static build step and clean URLs via Vercel #​1749

v1.1.2

Compare Source

Bug Fixes

v1.1.1

Compare Source

Fixes

Docs

Scripts

v1.1.0

Compare Source

Features

Fixes

  • Fix renderer.code includes space at beginning of each line of code #​1645
  • Fix codespan newline #​1652
  • Fix comma after underscore emphasis #​1660
  • Fix loose task list with no tokens #​1674
  • Add browser field in package.json pointing to es5 output #​1661
  • Add newline to rendered code with language #​1670
  • Fix async highlighter walking all tokens #​1664

Docs

v1.0.0

Compare Source

Breaking changes

  • Add inline tokens to marked.lexer output #​1627
  • Treat escape token same way as plain text tokens #​1642
  • Add Tokenizer to allow extending token creation #​1637

Features

  • Add marked.use() method to extend options #​1646

Fixes

  • Fix intra-word emphasis can match the wrong asterisks #​1636
  • Fix italics modifier (_) breaks links containing underscores #​1641
  • Fix closing delimited * incorrect for consecutive ocurrences #​1644

Docs

CI

v0.8.2

Compare Source

Fixes

Docs

v0.8.1

Compare Source

Fixes

v0.8.0

Compare Source

Breaking changes

Fixes

Docs

Dev Dependencies

v0.7.0

Compare Source

Security

Breaking Changes

Fixes

Tests

v0.6.3

Compare Source

Fixes

Docs

DevOps

v0.6.2

Compare Source

Security

Fixes

Enhancements

CLI

  • Update man page to include --test and fix argv parameters #​1442
  • Add a --version flag to print marked version #​1448

Testing

v0.6.1

Compare Source

Fixes

Docs

v0.6.0

Compare Source

Breaking Changes

  • Drop support for Node v0.10 and old browsers such as Internet Explorer
    • You should not have any problems if using Node 4+ or a modern browser
  • Add parameter slugger to Renderer.prototype.heading method #​1401
    • You should not have any problems if you do not override this method

New Features

Fixes

  • Fix emphasis followed by a punctuation #​1383
  • Fix bold around autolink email address #​1385
  • Make autolinks case insensitive #​1384
  • Make code fences compliant with Commonmark spec #​1387
  • Make blockquote paragraph continuation compliant with Commonmark spec #​1394
  • Make ordered list marker length compliant with Commonmark spec #​1391
  • Make empty list items compliant with Commonmark spec #​1395
  • Make tag escaping compliant with Commonmark spec #​1397
  • Make strong/bold compliant with Commonmark spec #​1400
  • Fix handling of adjacent lists #​684
  • Add better error handling when token type cannot be found #​1005
  • Fix duplicate heading id and non-latin characters #​1401

CLI

Docs

Tests

v0.5.2

Compare Source

Bug Fixes

  • Fix emphasis closing by single _ (part of left-flanking run) #​1351
  • Make URL handling consistent between links and images #​1359

Other

v0.5.1

Compare Source

Security

Bug Fixes

  • Fix typographic substitution in (pre|code|kbd|script) blocks when smartypants=true #​1335
  • Fix auto-linking email address #​1338

Other

v0.5.0

Compare Source

Security

Breaking Changes

Docs

CI

v0.4.0

Compare Source

Security Fixes

New Features

Breaking Changes

CLI Changes

Other changes

v0.3.19

Compare Source

0.3.18 did not have changes to min.


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 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, click this checkbox.

This PR has been generated by Mend Renovate. View repository job log here.

renovate[bot] avatar Jan 14 '22 21:01 renovate[bot]

Codecov Report

Merging #5164 (a185b53) into next (26f1b98) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##             next    #5164   +/-   ##
=======================================
  Coverage   31.03%   31.03%           
=======================================
  Files           6        6           
  Lines         232      232           
  Branches       50       50           
=======================================
  Hits           72       72           
  Misses        154      154           
  Partials        6        6           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Jan 14 '22 21:01 codecov[bot]

Renovate Ignore Notification

As this PR has been closed unmerged, Renovate will ignore this upgrade and you will not receive PRs for any future 4.x releases. However, if you upgrade to 4.x manually then Renovate will reenable minor and patch updates automatically.

If this PR was closed by mistake or you changed your mind, you can simply rename this PR and you will soon get a fresh replacement PR opened.

renovate[bot] avatar Sep 01 '22 03:09 renovate[bot]

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Sep 02 '23 00:09 github-actions[bot]