[Security] Bump highlight.js from 8.4.0 to 11.2.0
Bumps highlight.js from 8.4.0 to 11.2.0. This update includes a security fix.
Vulnerabilities fixed
Sourced from The GitHub Security Advisory Database.
Prototype Pollution in highlight.js
Impact
Affected versions of this package are vulnerable to Prototype Pollution. A malicious HTML code block can be crafted that will result in prototype pollution of the base object's prototype during highlighting. If you allow users to insert custom HTML code blocks into your page/app via parsing Markdown code blocks (or similar) and do not filter the language names the user can provide you may be vulnerable.
The pollution should just be harmless data but this can cause problems for applications not expecting these properties to exist and can result in strange behavior or application crashes, i.e. a potential DOS vector.
If your website or application does not render user provided data it should be unaffected.
Patches
Versions 9.18.2 and 10.1.2 and newer include fixes for this vulnerability. If you are using version 7 or 8 you are encouraged to upgrade to a newer release.
Workarounds
Patch your library
Manually patch your library to create null objects for both
languagesandaliases:const HLJS = function(hljs) { </tr></table>
... (truncated)
Affected versions: < 9.18.2
Release notes
Sourced from highlight.js's releases.
11.2.0 - mostly tiny fixes
Version 11.2.0
Build:
- fix: run Node build CSS files thru CSS processor also (#3284) Josh Goebel
Parser:
- fix(types) Fix some type definition issues (#3274) Josh Goebel
Grammars:
- enh(swift) Add
isolated/nonisolatedkeywords (#3296) Bradley MackeyNew Languages:
- Added 3rd party X# grammar to SUPPORTED_LANGUAGES Patrick Kruselburger
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
... (truncated)
Changelog
Sourced from highlight.js's changelog.
Version 11.2.0
Build:
- fix: run Node build CSS files thru CSS processor also (#3284) Josh Goebel
Parser:
- fix(types) Fix some type definition issues (#3274) Josh Goebel
Grammars:
- enh(swift) Add
isolated/nonisolatedkeywords (#3296) Bradley MackeyNew Languages:
- Added 3rd party X# grammar to SUPPORTED_LANGUAGES Patrick Kruselburger
- Added 3rd party MKB grammar to SUPPORTED_LANGUAGES (#3297) Dereavy
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
... (truncated)
Commits
2a5c592release 11.2.05790bf4(chore) fix CSS in the dev tool to be cross-browser once again (#3292)4fb68adenh(swift) addisolated/nonisolatedkeywords (#3296)2c617f5Add support for X# programming language (#3293)bd548dafix CSS files in NOde package (#3286)ba8735ffix(types) Fix some type definition issues (#3274)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)- 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.
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)