[Security] Bump highlight.js from 9.18.5 to 11.1.0
Bumps highlight.js from 9.18.5 to 11.1.0. This update includes a security fix.
Vulnerabilities fixed
Sourced from The GitHub Security Advisory Database.
ReDOS vulnerabities: multiple grammars
Impact: Potential ReDOS vulnerabilities (exponential and polynomial RegEx backtracking)
> 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.
If are you are using Highlight.js to highlight user-provided data you are possibly vulnerable. On the client-side (in a browser or Electron environment) risks could include lengthy freezes or crashes... On the server-side infinite freezes could occur... effectively preventing users from accessing your app or service (ie, Denial of Service).
This is an issue with grammars shipped with the parser (and potentially 3rd party grammars also), not the parser itself. If you are using Highlight.js with any of the following grammars you are vulnerable. If you are using
highlightAutoto detect the language (and have any of these grammars registered) you are vulnerable.All versions prior to 10.4.1 are vulnerable, including version 9.18.5.
Grammars with exponential backtracking issues:
- c-like (c, cpp, arduino)
- handlebars (htmlbars)
- gams
- perl
- jboss-cli
- r
... (truncated)
Affected versions: >= 9.0.0 < 10.4.1
Release notes
Sourced from highlight.js's releases.
v11.1 - Happy July
Grammars:
- fix(csharp) add missing
catchkeyword (#3251) Konrad Rudolph- add additional keywords to csp.js (#3244) Elijah Conners
- feat(css) handle css variables syntax (#3239) Thanos Karagiannis
- fix(markdown) Images with empty alt or links with empty text (#3233) Josh Goebel
- enh(powershell) added
pwshalias (#3236) tebeco- fix(r) fix bug highlighting examples in doc comments Konrad Rudolph
- fix(python) identifiers starting with underscore not highlighted (#3221) Antoine Lambert
- enh(clojure) added
ednalias (#3213) Stel Abrego- enh(elixir) much improved regular expression sigil support (#3207) Josh Goebel
- enh(elixir) updated list of keywords (#3212) Angelika Tyborska
- fix(elixir) fixed number detection when numbers start with a zero (#3212) Angelika Tyborska
- fix(ps1) Flag highlighted incorrectly (#3167) Pankaj Patil
- fix(latex) Allow wider syntax for magic comments (#3243) Benedikt Wilde
- fix(js/ts) Constants may include numbers Josh Goebel
11.0.1
- (fix) use console.log for .js.js deprecation warning (#3222) Josh Goebel
- (fix) do not restrict exports from cdn-assets (#3223) Josh Goebel
Version 11
Potentially Breaking Changes
This is a major release. As such it contains breaking changes which may require action from users. Most of the breaking changes work was done by the current maintainer Josh Goebel (ref: #2558) while many other contributors contributed many other changes for this release. You'll find that list below the breaking changes summary.
Please read VERSION_11_UPGRADE.md for a detailed summary of all breaking changes. The below list should only be considered to be a summary.
Deprecations / Removals / API Changes:
initHighlighting()andinitHighlightingOnLoad()deprecated. UsehighlightAll().highlightBlock(el)deprecated. UsehighlightElement(el)before:highlightBlock&after:highlightBlockcallbacks deprecated. Use equivalenthighlightElementcallbacks.highlight(languageName, code, ignoreIllegals, continuation)signature deprecated. Usehighlight(code, {language, ignoreIllegals}).- Deprecated
highlight()signature no longer supportscontinuationargument.tabReplaceoption removed. Consider a plugin.
... (truncated)
Changelog
Sourced from highlight.js's changelog.
Version 11.1.0
Grammars:
- fix(csharp) add missing
catchkeyword (#3251) Konrad Rudolph- add additional keywords to csp.js (#3244) Elijah Conners
- feat(css) handle css variables syntax (#3239) Thanos Karagiannis
- fix(markdown) Images with empty alt or links with empty text (#3233) Josh Goebel
- enh(powershell) added
pwshalias (#3236) tebeco- fix(r) fix bug highlighting examples in doc comments Konrad Rudolph
- fix(python) identifiers starting with underscore not highlighted (#3221) Antoine Lambert
- enh(clojure) added
ednalias (#3213) Stel Abrego- enh(elixir) much improved regular expression sigil support (#3207) Josh Goebel
- enh(elixir) updated list of keywords (#3212) Angelika Tyborska
- fix(elixir) fixed number detection when numbers start with a zero (#3212) Angelika Tyborska
- fix(ps1) Flag highlighted incorrectly (#3167) Pankaj Patil
- fix(latex) Allow wider syntax for magic comments (#3243) Benedikt Wilde
- fix(js/ts) Constants may include numbers Josh Goebel
Version 11.0.0
This is a major release. As such it contains breaking changes which may require action from users. Please read VERSION_11_UPGRADE.md for a detailed summary of all breaking changes.
Potentially breaking changes
Unless otherwise attributed items below are thanks to Josh Goebel (ref: #2558).
The below list should only be considered to be a high-level summary.
Deprecations / Removals / API Changes:
initHighlighting()andinitHighlightingOnLoad()deprecated. UsehighlightAll().highlightBlock(el)deprecated. UsehighlightElement(el)before:highlightBlock&after:highlightBlockcallbacks deprecated. Use equivalenthighlightElementcallbacks.highlight(languageName, code, ignoreIllegals, continuation)signature deprecated. Usehighlight(code, {language, ignoreIllegals}).- Deprecated
highlight()signature no longer supportscontinuationargument.tabReplaceoption removed. Consider a plugin.useBRoption removed. Consider a plugin or CSS.
... (truncated)
Commits
83ad2fb(release) bump 11.1.05befcb1fix(js/ts) constants may include numbersca331e9(docs) note location of CSS has changed with v111cb086bfix(build) registered language names should use-not_(#3264)55f68f7fix(ruby) fixed typo (#3259)28c7d41(build) include ESM distributables in CDN build (#3209)50eca53(chore) bump deps2d21c11(chore) simplify n1ql grammar2882e34(chore) deprecated commente8d9efc(chore) lint tools- Additional commits viewable in compare view
Maintainer changes
This version was pushed to npm by highlightjs_bot, a new releaser for highlight.js since your current version.
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 rebasewill rebase this PR -
@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it -
@dependabot mergewill merge this PR after your CI passes on it -
@dependabot squash and mergewill squash and merge this PR after your CI passes on it -
@dependabot cancel mergewill cancel a previously requested merge and block automerging -
@dependabot reopenwill reopen this PR if it is closed -
@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) -
@dependabot ignore this dependencywill 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 labelswill set the current labels as the default for future PRs for this repo and language -
@dependabot use these reviewerswill set the current reviewers as the default for future PRs for this repo and language -
@dependabot use these assigneeswill set the current assignees as the default for future PRs for this repo and language -
@dependabot use this milestonewill set the current milestone as the default for future PRs for this repo and language -
@dependabot badge mewill 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)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)