From e90fb4b55cf3b42a735093da9040c4804fbc95dc Mon Sep 17 00:00:00 2001 From: "Abdullah." <125115953+mabdullahabaid@users.noreply.github.com> Date: Sun, 21 Jun 2026 18:05:17 +0500 Subject: [PATCH] fix(security): bump dompurify to 3.4.11 (config/hook pollution) (#21905) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## fix(security): bump dompurify to 3.4.11 (config/hook pollution) Resolves [Dependabot Alert #1520](https://github.com/twentyhq/twenty/security/dependabot/1520) and [#1509](https://github.com/twentyhq/twenty/security/dependabot/1509). ### What `dompurify` is affected by: - **Permanent `ALLOWED_ATTR` pollution via `setConfig()`** ([#1520](https://github.com/twentyhq/twenty/security/dependabot/1520), Moderate, `<= 3.4.10`) - **Trusted Types policy survives `clearConfig()`** ([#1509](https://github.com/twentyhq/twenty/security/dependabot/1509), Low, `< 3.4.9`) Both patched in `3.4.11`. Bumps the direct `twenty-server` dep `^3.4.0 -> ^3.4.11`. ### Compatibility Both advisories are about config/hook state pollution via `setConfig`/`clearConfig`/hooks. All four of our call sites use plain `DOMPurify(window).sanitize(...)` with **default config** — no `setConfig`, `clearConfig`, `addHook`, `ALLOWED_ATTR`, or `RETURN_TRUSTED_TYPE` — so we are not on the affected path, and the fix does not change default-`sanitize` behavior. Verification: `typecheck twenty-server` passes; the `prepare-file-for-storage`, `create-html-to-text-converter`, and `email-composer` suites pass (28 tests). ### Verification - `dompurify` resolves to `3.4.11` (no `<= 3.4.10` remains). - Lockfile + single package.json pin change; `yarn install --immutable` passes. --- packages/twenty-server/package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/twenty-server/package.json b/packages/twenty-server/package.json index 0d6af0a851..ed0e3596a9 100644 --- a/packages/twenty-server/package.json +++ b/packages/twenty-server/package.json @@ -94,7 +94,7 @@ "dataloader": "2.2.2", "date-fns": "4.4.0", "digest-fetch": "^3.1.1", - "dompurify": "^3.4.0", + "dompurify": "^3.4.11", "dotenv": "16.4.5", "email-reply-parser": "^2.3.5", "express": "5.2.1", diff --git a/yarn.lock b/yarn.lock index c7cf746f5a..fbfbd3a495 100644 --- a/yarn.lock +++ b/yarn.lock @@ -31831,15 +31831,15 @@ __metadata: languageName: node linkType: hard -"dompurify@npm:^3.4.0": - version: 3.4.8 - resolution: "dompurify@npm:3.4.8" +"dompurify@npm:^3.4.11": + version: 3.4.11 + resolution: "dompurify@npm:3.4.11" dependencies: "@types/trusted-types": "npm:^2.0.7" dependenciesMeta: "@types/trusted-types": optional: true - checksum: 10c0/8f56a53d0ac80c76068772c9b72721f31fad68cac64a528e2420699ce2bd26b3516e29a5a7bd2205c2732d7114b9859998bf922d20cdb9361c4a05dab8352570 + checksum: 10c0/31439481c7e8fc3805d40c376936fd66936620fb1b1a31a2ec097f6165412c37f2d868e082c9ceba62bb37661c1ea132a5db4d5213434317e30df68d4aca9cc9 languageName: node linkType: hard @@ -54303,7 +54303,7 @@ __metadata: dataloader: "npm:2.2.2" date-fns: "npm:4.4.0" digest-fetch: "npm:^3.1.1" - dompurify: "npm:^3.4.0" + dompurify: "npm:^3.4.11" dotenv: "npm:16.4.5" email-reply-parser: "npm:^2.3.5" express: "npm:5.2.1"