Skip to content

chore(deps): bump sanitize-html from 2.17.4 to 2.17.7 in /packages/frontend - #1331

Open
dependabot[bot] wants to merge 1 commit into
developfrom
dependabot/npm_and_yarn/packages/frontend/sanitize-html-2.17.7
Open

dependabot[bot] wants to merge 1 commit into
developfrom
dependabot/npm_and_yarn/packages/frontend/sanitize-html-2.17.7

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 2, 2026

Copy link
Copy Markdown
Contributor

Bumps sanitize-html from 2.17.4 to 2.17.7.

Changelog

Sourced from sanitize-html's changelog.

2.17.7 (2026-08-13)

Security

  • Fixed an XSS / URL scheme policy bypass affecting configurations that allow the SVG animation elements (animate, animateColor, animateMotion, animateTransform or set) together with attributeName and one of the animation value attributes. The default configuration was not affected, as these elements are not in the default allowedTags. apostrophecms was not affected. Thanks to koyokr for responsibly disclosing the vulnerability (GHSA-g8qq-57p8-ggw5).

2.17.6 (2026-07-10)

Fixes

  • Allow transformTags to emit text when textFilter is set, even if the tag is initially empty. This is consistent with the documentation. Thanks to spokodev for the fix.

Security

  • Fixed an XSS/allowlist bypass in which the contents of a raw-text element (textarea or xmp) nested inside an svg or math root were re-emitted without HTML-escaping. sanitize-html treated that content as inert raw text because htmlparser2 10.x classified raw-text elements by tag name and ignored the namespace, but a real HTML5 parser treats textarea/xmp as ordinary foreign elements inside SVG/MathML and re-parses their contents as live markup. As a result, markup and event-handler attributes that the allowlist never permitted (for example <svg><textarea><img src=x onerror=alert(1)>) could survive sanitization and execute in the browser. This is now fixed on two fronts: htmlparser2 was upgraded to 12.x, which is namespace-aware and parses textarea/xmp inside SVG/MathML as ordinary elements, so their non-allowlisted children (such as the injected img) are dropped by the allowlist instead of being preserved as raw text; and any raw-text content sanitize-html still emits for these tags (at HTML integration points such as foreignObject/mtext, or outside foreign content) is always HTML-escaped. The default configuration is not affected; the precondition is an allowedTags that includes svg or math together with textarea or xmp. Thanks to khoadb175 for responsibly disclosing the vulnerability.
  • Fixed a mutation-XSS / allowedTags bypass affecting configurations that allow the textarea or xmp raw-text tags. htmlparser2 10.x did not recognize an end tag with a trailing solidus (e.g. </textarea/>) as closing the element, so it kept the following markup as raw text, but a spec-compliant browser treats </textarea/> as a valid close and parses that markup as a live element. Because raw-text content was re-emitted without escaping, a payload such as <textarea></textarea/><img src=x onerror=...> could smuggle non-allowlisted, executable markup through the sanitizer. The default configuration was not affected. This is now defended at two layers: htmlparser2 was upgraded to 12.x, whose tokenizer closes these end tags correctly, and the raw text sanitize-html emits for these tags is always escaped so no < can reopen a tag when the output is re-parsed (textarea, an RCDATA element whose entities htmlparser2 decodes, is escaped like normal text, while xmp, a raw-text element, has only its angle brackets escaped to avoid double-encoding already-encoded entities). Because htmlparser2 is ESM-only from version 11 onward, sanitize-html now requires Node.js >=22.12.0 (the first 22.x release in which require() of an ES module is available unflagged). Thanks to bibu123456 for reporting the vulnerability and Kayiz-PT for coordinating the disclosure (GHSA-jxwj-j7wr-gfrw).

2.17.5 (2026-06-10)

Security

  • Added a number of new attributes to be protected against unsafe URLs, e.g. javascript: and similar. None of these are used in the default configuration of sanitize-html or apostrophe or likely to be used there, and some attributes, like an action for a form, are inherently unsafe to allow if XSS protection is your goal. Nevertheless it makes sense to block certain URL types where they are not appropriate. Some attributes are not supported at all by modern browsers but are included for completeness. Thanks to crattack for reporting the vulnerability.
  • Address a potential vulnerability when nonTextTags is configured in a nonstandard way. While it is never a good idea to remove known non-text tags from the standard list e.g. script, styles, etc., this change ensures that doing so does not result in nested tags being passed through without sanitization when they are not expressly allowed. (ApostropheCMS would never trigger this situation.) Thanks to Dipanshu singh for pointing out the issue and contributing the fix.
Commits

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 show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @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)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps [sanitize-html](https://github.com/apostrophecms/apostrophe/tree/HEAD/packages/sanitize-html) from 2.17.4 to 2.17.7.
- [Changelog](https://github.com/apostrophecms/apostrophe/blob/main/packages/sanitize-html/CHANGELOG.md)
- [Commits](https://github.com/apostrophecms/apostrophe/commits/HEAD/packages/sanitize-html)

---
updated-dependencies:
- dependency-name: sanitize-html
  dependency-version: 2.17.7
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Docker 起動・検証に失敗しました

エラーログ
…(省略)
p libgl1-mesa-dri:amd64 (22.3.6-1+deb12u2) ...
#13 23.13 Setting up libxext6:amd64 (2:1.3.4-1+b1) ...
#13 23.13 Setting up libopenal1:amd64 (1:1.19.1-2) ...
#13 23.13 Setting up libcairo2:amd64 (1.16.0-7) ...
#13 23.14 Setting up libxxf86vm1:amd64 (1:1.1.4-1+b2) ...
#13 23.14 Setting up libass9:amd64 (1:0.17.1-1) ...
#13 23.14 Setting up libxfixes3:amd64 (1:6.0.0-2) ...
#13 23.14 Setting up libxv1:amd64 (2:1.0.11-1.1) ...
#13 23.15 Setting up libxrandr2:amd64 (2:1.5.2-2+b1) ...
#13 23.15 Setting up libvdpau1:amd64 (1.5-2) ...
#13 23.15 Setting up libtheora0:amd64 (1.1.1+dfsg.1-16.1+deb12u1) ...
#13 23.16 Setting up libcairo-gobject2:amd64 (1.16.0-7) ...
#13 23.16 Setting up libxss1:amd64 (1:1.2.3-1) ...
#13 23.16 Setting up libpangoft2-1.0-0:amd64 (1.50.12+ds-1) ...
#13 23.16 Setting up libva-x11-2:amd64 (2.17.0-1) ...
#13 23.17 Setting up libpangocairo-1.0-0:amd64 (1.50.12+ds-1) ...
#13 23.17 Setting up libglx-mesa0:amd64 (22.3.6-1+deb12u2) ...
#13 23.17 Setting up libxi6:amd64 (2:1.8-1+b1) ...
#13 23.17 Setting up libglx0:amd64 (1.6.0-1) ...
#13 23.18 Setting up libsphinxbase3:amd64 (0.8+5prealpha+1-16) ...
#13 23.18 Setting up libxcursor1:amd64 (1:1.2.1-1) ...
#13 23.18 Setting up librsvg2-2:amd64 (2.54.7+dfsg-1~deb12u1) ...
#13 23.18 Setting up libpocketsphinx3:amd64 (0.8+5prealpha+1-15) ...
#13 23.19 Setting up libavutil57:amd64 (7:5.1.9-0+deb12u1) ...
#13 23.19 Setting up libgl1:amd64 (1.6.0-1) ...
#13 23.19 Setting up libswresample4:amd64 (7:5.1.9-0+deb12u1) ...
#13 23.19 Setting up libpostproc56:amd64 (7:5.1.9-0+deb12u1) ...
#13 23.19 Setting up libavcodec59:amd64 (7:5.1.9-0+deb12u1) ...
#13 23.20 Setting up libsdl2-2.0-0:amd64 (2.26.5+dfsg-1) ...
#13 23.20 Setting up libswscale6:amd64 (7:5.1.9-0+deb12u1) ...
#13 23.20 Setting up libchromaprint1:amd64 (1.5.1-2+b1) ...
#13 23.20 Setting up libavformat59:amd64 (7:5.1.9-0+deb12u1) ...
#13 23.20 Setting up libavfilter8:amd64 (7:5.1.9-0+deb12u1) ...
#13 23.21 Setting up libavdevice59:amd64 (7:5.1.9-0+deb12u1) ...
#13 23.21 Setting up ffmpeg (7:5.1.9-0+deb12u1) ...
#13 23.21 Processing triggers for libc-bin (2.36-9+deb12u14) ...
#13 23.30 useradd warning: misskey's uid 991 outside of the UID_MIN 1000 and UID_MAX 60000 range.
#13 DONE 24.4s

#40 [native-builder 19/23] RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked 	pnpm i --frozen-lockfile --aggregate-output
#40 0.860 Scope: all 12 workspace projects
#40 1.101 ? Verifying lockfile against supply-chain policies (2154 entries)...
#40 1.555 
#40 1.555    ╭──────────────────────────────────────────╮
#40 1.555    │                                          │
#40 1.555    │   Update available! 11.5.2 → 11.25.0.    │
#40 1.555    │   Changelog: https://pnpm.io/v/11.25.0   │
#40 1.555    │     To update, run: pnpm add -g pnpm     │
#40 1.555    │                                          │
#40 1.555    ╰──────────────────────────────────────────╯
#40 1.555 
#40 ...

#42 [runner  3/17] COPY ./package.json ./package.json
#42 DONE 0.0s

#43 [runner  4/17] RUN node -e "console.log(JSON.parse(require('node:fs').readFileSync('./package.json')).packageManager)" | xargs npm install -g
#43 1.659 
#43 1.659 added 1 package in 1s
#43 1.659 
#43 1.659 1 package is looking for funding
#43 1.659   run `npm fund` for details
#43 1.661 npm notice
#43 1.661 npm notice New major version of npm available! 11.16.0 -> 12.0.2
#43 1.661 npm notice Changelog: https://github.com/npm/cli/releases/tag/v12.0.2
#43 1.661 npm notice To update run: npm install -g npm@12.0.2
#43 1.661 npm notice
#43 DONE 1.8s

#44 [target-builder 12/12] RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked 	pnpm i --frozen-lockfile --aggregate-output
#44 ...

#45 [runner  5/17] WORKDIR /cherrypick
#45 DONE 0.0s

#40 [native-builder 19/23] RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked 	pnpm i --frozen-lockfile --aggregate-output
#40 8.909 ✓ Lockfile passes supply-chain policies (2154 entries in 7.8s)
#40 8.938 [ERR_PNPM_OUTDATED_LOCKFILE] Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up to date with <ROOT>/packages/frontend/package.json
#40 8.938 
#40 8.938 Note that in CI environments this setting is true by default. If you still need to run install in such cases, use "pnpm install --no-frozen-lockfile"
#40 8.938 
#40 8.938   Failure reason:
#40 8.938   specifiers in the lockfile don't match specifiers in package.json:
#40 8.938 * 1 dependencies are mismatched:
#40 8.938   - sanitize-html (lockfile: 2.17.4, manifest: 2.17.7)
#40 8.938 
#40 ERROR: process "/bin/sh -c pnpm i --frozen-lockfile --aggregate-output" did not complete successfully: exit code: 1

#44 [target-builder 12/12] RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked 	pnpm i --frozen-lockfile --aggregate-output
#44 CANCELED
------
 > [native-builder 19/23] RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked 	pnpm i --frozen-lockfile --aggregate-output:
8.909 ✓ Lockfile passes supply-chain policies (2154 entries in 7.8s)
8.938 [ERR_PNPM_OUTDATED_LOCKFILE] Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up to date with <ROOT>/packages/frontend/package.json
8.938 
8.938 Note that in CI environments this setting is true by default. If you still need to run install in such cases, use "pnpm install --no-frozen-lockfile"
8.938 
8.938   Failure reason:
8.938   specifiers in the lockfile don't match specifiers in package.json:
8.938 * 1 dependencies are mismatched:
8.938   - sanitize-html (lockfile: 2.17.4, manifest: 2.17.7)
8.938 
------
Dockerfile:38

--------------------

  37 |     

  38 | >>> RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \

  39 | >>> 	pnpm i --frozen-lockfile --aggregate-output

  40 |     

--------------------

failed to solve: process "/bin/sh -c pnpm i --frozen-lockfile --aggregate-output" did not complete successfully: exit code: 1


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 javascript Pull requests that update Javascript code packages/frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants