Skip to content

Bump sanitize-html from 2.17.2 to 2.17.3 - #8

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/sanitize-html-2.17.3
Open

Bump sanitize-html from 2.17.2 to 2.17.3#8
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/sanitize-html-2.17.3

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Apr 16, 2026

Copy link
Copy Markdown

Bumps sanitize-html from 2.17.2 to 2.17.3.

Changelog

Sourced from sanitize-html's changelog.

2.17.3 (2026-04-15)

Security

  • Fix vulnerability introduced in version 2.17.2 that allowed XSS attacks if the developer chose to permit option tags. There was no vulnerability when not explicitly allowing option tags.
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.2 to 2.17.3.
- [Changelog](https://github.com/apostrophecms/apostrophe/blob/main/packages/sanitize-html/CHANGELOG.md)
- [Commits](https://github.com/apostrophecms/apostrophe/commits/sanitize-html@2.17.3/packages/sanitize-html)

---
updated-dependencies:
- dependency-name: sanitize-html
  dependency-version: 2.17.3
  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 Apr 16, 2026
@greptile-apps

greptile-apps Bot commented Apr 16, 2026

Copy link
Copy Markdown

Greptile Summary

This PR bumps sanitize-html from 2.17.2 to 2.17.3 to patch an XSS vulnerability introduced in 2.17.2 that affected developers who explicitly allowed option tags. The project's own sanitize-rich-text.ts config does not include option in ALLOWED_TAGS, so it was not exposed to the specific vulnerability — but upgrading is still the right defensive move.

Beyond the intended bump, the pnpm-lock.yaml also contains additional unrelated changes worth being aware of:

  • libc field stripped from dozens of optional platform-specific packages (e.g. @img/sharp-*, @rollup/rollup-linux-*, @tailwindcss/oxide-*, lightningcss-linux-*, @napi-rs/canvas-*). This appears to be a pnpm lock-file format change from regenerating the lock file.
  • @preact/signals-core bumped from 1.14.0 → 1.14.1, an unrelated dependency that was not mentioned in the PR description.
  • postcss bumped from 8.5.8 → 8.5.10 as a transitive dependency of sanitize-html@2.17.3.

Confidence Score: 5/5

Safe to merge — the security fix is correct and the project was not vulnerable to the patched CVE, making this a low-risk improvement.

The sanitize-html bump is a targeted patch-level security fix. The project's own sanitization config does not allow option tags, so it was never exposed to the vulnerability. The extra lock file noise (libc field removals, @preact/signals-core bump) is worth noting but carries very low practical risk in standard deployment environments. No application logic changed.

pnpm-lock.yaml — review the libc field removals and the unannounced @preact/signals-core bump if using musl/Alpine Docker images in CI/CD.

Important Files Changed

Filename Overview
package.json Single line change: bumps sanitize-html specifier from ^2.17.2 to ^2.17.3 — clean and correct.
pnpm-lock.yaml Updates sanitize-html resolution and its postcss transitive dep; also strips libc fields from many optional platform packages and bumps @preact/signals-core — changes beyond what the PR description covers.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["sanitize-html@2.17.2\n(XSS vuln if option tags allowed)"] -->|"bump"| B["sanitize-html@2.17.3\n(XSS fix)"]
    B --> C["postcss@8.5.10\n(transitive dep bump)"]
    D["src/lib/server/sanitize-rich-text.ts\nALLOWED_TAGS does NOT include option"] -->|"not vulnerable\nbut good practice"| B
    E["pnpm install side-effects"] --> F["@preact/signals-core\n1.14.0 → 1.14.1"]
    E --> G["libc fields stripped\nfrom optional platform packages"]
Loading

Reviews (1): Last reviewed commit: "Bump sanitize-html from 2.17.2 to 2.17.3" | Re-trigger Greptile

Comment thread pnpm-lock.yaml
Comment on lines 1188 to 1248

'@img/sharp-libvips-linux-arm@1.0.5':
resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==}
cpu: [arm]
os: [linux]
libc: [glibc]

'@img/sharp-libvips-linux-s390x@1.0.4':
resolution: {integrity: sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==}
cpu: [s390x]
os: [linux]
libc: [glibc]

'@img/sharp-libvips-linux-x64@1.0.4':
resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==}
cpu: [x64]
os: [linux]
libc: [glibc]

'@img/sharp-libvips-linuxmusl-arm64@1.0.4':
resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==}
cpu: [arm64]
os: [linux]
libc: [musl]

'@img/sharp-libvips-linuxmusl-x64@1.0.4':
resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==}
cpu: [x64]
os: [linux]
libc: [musl]

'@img/sharp-linux-arm64@0.33.5':
resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [arm64]
os: [linux]
libc: [glibc]

'@img/sharp-linux-arm@0.33.5':
resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [arm]
os: [linux]
libc: [glibc]

'@img/sharp-linux-s390x@0.33.5':
resolution: {integrity: sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [s390x]
os: [linux]
libc: [glibc]

'@img/sharp-linux-x64@0.33.5':
resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [x64]
os: [linux]
libc: [glibc]

'@img/sharp-linuxmusl-arm64@0.33.5':
resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [arm64]
os: [linux]
libc: [musl]

'@img/sharp-linuxmusl-x64@0.33.5':
resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==}
engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0}
cpu: [x64]
os: [linux]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Unexpected libc field removal across many optional packages

The lock file strips the libc constraint from dozens of platform-specific optional packages (e.g. @img/sharp-libvips-linux-arm64, @rollup/rollup-linux-arm64-gnu, @tailwindcss/oxide-linux-arm64-gnu, lightningcss-linux-arm64-gnu, @napi-rs/canvas-linux-arm64-gnu, and many more), which is not related to the sanitize-html bump.

The libc field is what pnpm uses to skip installing glibc binaries on musl-based Linux hosts (e.g. Alpine Docker images) and vice-versa. Removing these fields means pnpm will fall back to the OS-level resolution heuristic alone, which typically works in practice but could lead to installing the wrong native binary variant on edge-case Linux environments.

This looks like the lock file was regenerated with a different pnpm version (or after pnpm install touched other packages). It's low-risk in most setups, but worth confirming that the CI/CD environment and any Alpine/musl Docker images still resolve sharp, rollup, tailwindcss oxide, and canvas binaries correctly after this change.

Comment thread pnpm-lock.yaml
Comment on lines +6710 to 6711
'@preact/signals-core@1.14.1': {}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Undescribed @preact/signals-core version bump

@preact/signals-core is bumped from 1.14.0 → 1.14.1 here, but this change is not mentioned in the PR description. It appears to be a side effect of running pnpm install alongside the sanitize-html update rather than an intentional upgrade. If this was unintentional, consider reverting it to keep the PR focused, or add a note acknowledging it.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants