ChristopherLMiller / app.christopherleemiller.me-old

https://www.christopherleemiller.me
0 stars 1 forks source link

[Security] Bump highlight.js from 10.0.3 to 10.1.2 #752

Closed dependabot-preview[bot] closed 3 years ago

dependabot-preview[bot] commented 3 years ago

Bumps highlight.js from 10.0.3 to 10.1.2. 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 languages and aliases:

const HLJS = function(hljs) {
</tr></table> ... (truncated)

Affected versions: >= 10.0.0 < 10.1.2

Release notes

Sourced from highlight.js's releases.

10.1.2

Fixes:

  • fix(night) Prevent object prototype values from being returned by getLanguage (#2636) night

10.1.1

Fixes:

  • Resolve issue on Node 6 due to dangling comma (#2608) [Edwin Hoogerbeets][]
  • Resolve index.d.ts is not a module error (#2603) [Josh Goebel][]

10.1.0

Just your typical minor release. Plenty of fixes and enhancements, few new themes.

Some deprecations language maintainers might want to pay attention to:

  • htmlbars grammar is now deprecated. Use handlebars instead. (#2344) [Nils Knappmeier][]
  • when using highlightBlock result.re deprecated. Use result.relevance instead. (#2552) [Josh Goebel][]
  • ditto for result.second_best.re => result.second_best.relevance (#2552)
  • lexemes is now deprecated in favor of keywords.$pattern key (#2519) [Josh Goebel][]
  • endSameAsBegin is now deprecated. (#2261) [Josh Goebel][]
Changelog

Sourced from highlight.js's changelog.

Version 10.1.2

Fixes:

  • fix(night) Prevent object prototype values from being returned by getLanguage (#2636) night

Version 10.1.1

Fixes:

Version 10.1.0

New themes:

  • NNFX and NNFX-dark by [Jim Mason][]
  • lioshi by [lioshi][]

Parser Engine:

  • (parser) Now escapes quotes in text content when escaping HTML (#2564) Josh Goebel
  • (parser) Adds keywords.$pattern key to grammar definitions (#2519) Josh Goebel
  • (parser) Adds SHEBANG utility mode Josh Goebel
  • (parser) Adds registerAliases method (#2540) [Taufik Nurrohman][]
  • (enh) Added on:begin callback for modes (#2261) Josh Goebel
  • (enh) Added on:end callback for modes (#2261) Josh Goebel
  • (enh) Added ability to programatically ignore begin and end matches (#2261) Josh Goebel
  • (enh) Added END_SAME_AS_BEGIN mode to replace endSameAsBegin parser attribute (#2261) Josh Goebel
  • (fix) fixMarkup would rarely destroy markup when useBR was enabled (#2532) Josh Goebel

Deprecations:

  • htmlbars grammar is now deprecated. Use handlebars instead. (#2344) [Nils Knappmeier][]
  • when using highlightBlock result.re deprecated. Use result.relevance instead. (#2552) Josh Goebel
  • ditto for result.second_best.re => result.second_best.relevance (#2552)
  • lexemes is now deprecated in favor of keywords.$pattern key (#2519) Josh Goebel
  • endSameAsBegin is now deprecated. (#2261) Josh Goebel

Language Improvements:

  • fix(groovy) strings are not allowed inside ternary clauses (#2217) Josh Goebel
Commits
  • edd73d2 bump v10.1.2
  • 7241013 (parser) use null prototype objects for languages/aliases (#2636)
  • 93fd0d7 bump v10.1.1; (chore) add changelog for 10.1.1
  • c5783d2 (chore) clean up types just a little
  • a4ee4e4 (chore) declare ambient modules for lib/core & languges
  • 0656588 (chore) removed dangling comma (#2612)
  • b1bce6e (chore) more import below metadata comment
  • 74de6ea (chore) bump copyright
  • b2d19b0 bump v10.1.0
  • 84f7fa3 (chore) upgrade some dev stuff to newer versions
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by isagalaev, a new releaser for highlight.js 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.


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 close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will 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 version` will 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 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 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 the `.dependabot/config.yml` file in this repo: - Update frequency - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired)
dependabot-preview[bot] commented 3 years ago

Superseded by #755.