# CVE-2026-140391: DOMPurify before 3.4.18 SAFE\_FOR\_TEMPLATES Bypass Leading to XSS

- Priority: **Routine**
- Reason: Not severe (CVSS 5.1, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-12-01 · Modified: 2026-12-01
- Aliases: DEBIAN-CVE-2026-140391, GHSA-qm7q-q8h9-jg8q, UBUNTU-CVE-2026-140391, CGA-3x62-wr8r-q7r5, CGA-qr4c-9g2v-rqfg, CGA-23vx-x6q7-qh26, CGA-2j3f-rcx3-8vfm, CGA-2rrc-gq5h-7rjw, CGA-2vmj-p4rw-3gg5, CGA-2vqw-rmr4-fpm5, CGA-2w64-q2c6-7pgm, CGA-3568-cf46-hc62, CGA-35fw-7997-f833, CGA-35j4-rpxq-99pq, CGA-35xm-cwqc-89r2, CGA-3g28-m9cf-vjcc, CGA-3mqj-jf98-8678, CGA-3qmq-v7r6-876m, CGA-3qvj-vm7p-7v25, CGA-3qwx-pvqw-47m8, CGA-497m-w3r6-72mp, CGA-4p63-24cr-7gmq, CGA-4pwx-hv37-3967, CGA-4v44-jjrv-g8cj, CGA-54rc-p3h6-654h, CGA-55h7-xwrf-rmfw, CGA-5c57-hjgh-6pj4, CGA-5jcp-v4hx-f47v, CGA-5jpf-4r8q-7263, CGA-5pcg-rj7p-5mpq, CGA-5vqm-mjf9-69fh, CGA-5x99-8vwq-r4h9, CGA-6694-hvq6-gjrm, CGA-676f-jvr3-25wp, CGA-6hfx-859c-jrpg, CGA-6xp7-cj56-fr9g, CGA-7845-g928-xfw2, CGA-79xg-v86g-vgm6, CGA-7g5f-7w84-8w5j, CGA-7wc6-gmjp-7hrp, CGA-8875-5c9w-974v, CGA-8f9r-8p33-p5q4, CGA-8h77-gxgr-jmh7, CGA-8hpx-rpw2-6cjf, CGA-8hrg-vcj4-w943, CGA-8p9h-mx82-9m48, CGA-8r4j-v9xf-r4r5, CGA-97cm-qxfp-2rmc, CGA-9gc8-c22v-mvw5, CGA-9jfw-5wq9-fvqj, CGA-9p5q-xgf2-qc9r, CGA-9rgp-4q85-hxxr, CGA-9rrv-gf3j-x985, CGA-c8mq-w4vp-9m7c, CGA-cffq-2v63-fqr4, CGA-cjp3-8mfj-h37h, CGA-cmj7-3j8f-c9w4, CGA-cpcf-hm2p-vg8f, CGA-fgp5-98m8-f9fc, CGA-fgr7-rjf4-pxc4, CGA-fjhf-hqr3-mw3x, CGA-fmqq-4rjf-6r53, CGA-fmwg-2r8m-qrmf, CGA-fq8c-qr92-j7x5, CGA-fvcr-3r5r-g33r, CGA-gg47-73jj-4q33, CGA-gj6x-f3g3-73mv, CGA-gjrr-c7v3-fg84, CGA-gpcj-78rj-r687, CGA-gr4j-qr8m-5qc6, CGA-grv3-5xq9-95wr, CGA-gv26-69c3-3x5g, CGA-h9v7-wv9v-2vhv, CGA-hfxj-pq78-36w8, CGA-hp4j-24vp-c98r, CGA-hqpg-hh85-x5x9, CGA-jf95-rhg7-m6xh, CGA-jjgw-9xj2-gw35, CGA-jmjj-mj4x-rppf, CGA-jr2c-3xjw-w72v, CGA-jr32-mcm3-6q8x, CGA-mf2x-rj78-r32j, CGA-mpgw-5x82-f4wq, CGA-mqqg-356f-rf95, CGA-mrr6-r7mh-7c9m, CGA-mrx6-p5rh-mgqf, CGA-mwmv-mx3r-mm48, CGA-pg5r-4v55-4fj7, CGA-phm3-239p-pcpf, CGA-pjcc-7982-frxw, CGA-ppv4-fm7h-222h, CGA-pvw2-9vjx-gr33, CGA-pxp8-f8xv-66jp, CGA-pxvp-548f-68hr, CGA-qvmp-7v28-4636, CGA-qxfg-89fj-g66r, CGA-rfj2-8q5p-9h7p, CGA-rj3q-4728-38cr, CGA-rm8j-72fx-82qw, CGA-rq47-cgg9-x6fp, CGA-rxxq-g33v-xf93, CGA-vqrw-355w-3mph, CGA-vr3f-43x3-v4q2, CGA-vwrr-64r8-vv9w, CGA-vxxh-mwqw-wqvq, CGA-wpr8-ppv2-pj35, CGA-xg84-8jwv-c584, CGA-xgf4-6g6x-5c2x, CGA-xj2h-vxv6-v462, CGA-xjw2-24c8-h4r8, CGA-xm4w-f2x7-m8pw, CGA-xphw-6mmw-6cpf, CGA-5f3x-xp6h-m37g, CGA-28rx-mhvq-fchc, CGA-3867-w4ch-864f, CGA-3fp5-w4fh-pjwx, CGA-42wh-rrpm-vhhf, CGA-4548-h74h-877w, CGA-45vp-f7wm-qcvh, CGA-468v-cmqh-qhcp, CGA-4hmg-pjcx-8m2g, CGA-4v4f-fx75-whcr, CGA-53j6-wjrr-348p, CGA-669j-ggmp-fwrg, CGA-6hw5-2gcr-xr6x, CGA-6p24-c3hv-rhf6, CGA-7q7h-6gwf-mxpq, CGA-7vw7-379w-xh27, CGA-835w-rwv9-3wp8, CGA-83qj-gxw7-7x7w, CGA-842h-57xf-5gqf, CGA-85c8-rq8p-r69r, CGA-889r-w2j9-r9jh, CGA-8c9j-74ww-hgwx, CGA-8j54-wffp-cw6x, CGA-8qfv-9c58-7966, CGA-93mp-2q83-3f4v, CGA-9425-387g-jr2g, CGA-94cp-534r-pqxv, CGA-966m-52h6-rg3r, CGA-9f4w-x3cg-3x66, CGA-9qr2-jq3h-6vc2, CGA-9wh8-h23c-92hg, CGA-9wv7-47rm-r4f4, CGA-c5fp-pq58-479p, CGA-ccxf-fqgp-p424, CGA-cpv4-vppm-qx59, CGA-cwgc-v46j-25r5, CGA-f5c9-4v8x-995w, CGA-fghh-22wj-3pq3, CGA-fpv6-mp27-5mc2, CGA-fq8w-8xw3-xpvh, CGA-frp5-gw9w-jv2x, CGA-fvgp-f2jf-mg63, CGA-g2rm-fh8v-8cfw, CGA-gmv5-52w3-3x4f, CGA-gp85-w3m7-3gjq, CGA-gv8v-6mxf-v7f4, CGA-h4hm-cx74-7xfw, CGA-h6xj-572q-8rgf, CGA-h7hv-m4v5-w9hw, CGA-hg6r-fmpv-6gjc, CGA-hgf4-xm4c-gc92, CGA-hvfx-mm8x-pwj7, CGA-j9mr-cwv3-6xhf, CGA-jc4x-rh8v-pvhq, CGA-jj4q-ch9p-wvwq, CGA-jmf4-77j2-p4qv, CGA-jrfq-4rw7-cwg8, CGA-m7wc-m3jx-669p, CGA-m8c3-3385-g734, CGA-m9v2-3cvx-v73f, CGA-mp2j-p36w-373c, CGA-p592-mq76-h45j, CGA-p5p9-8jgc-9j65, CGA-pvj9-ccj9-g498, CGA-pw4c-v439-2jh9, CGA-qfjr-gvqr-hcpp, CGA-qhgm-m8rj-4hpx, CGA-r83p-6hxf-w34g, CGA-rf3r-9f2g-2ffq, CGA-rx9f-4g56-f8wr, CGA-v82p-8f5r-38x8, CGA-vg23-w4mc-h6fm, CGA-vhj4-mmm8-92pg, CGA-vrmc-2jpv-c5q8, CGA-vw2p-5m54-65hg, CGA-wj53-fg76-w639, CGA-wq7q-vc27-jqg2, CGA-x7h5-hrq4-jhr9, CGA-x9rg-rx6g-892r, CGA-xgm6-c426-ghvv, CGA-xjmr-cp7h-3q9v, CGA-xm8w-pff4-2vrw, CGA-xrh5-v696-53qw, CGA-947v-3x64-236m, CGA-c5wx-2c5h-mm5q, CGA-g2cj-g7pv-h5x8, CGA-g44v-mf66-vg22, CGA-g9pp-xm7p-wg67, CGA-h46f-2chj-rghx, CGA-h6g6-mjq8-25wf, CGA-j8r9-hccg-35wh, CGA-m36g-2fxv-c83h, CGA-m5cv-px23-qqgf, CGA-m88f-9fgv-xghv, CGA-m9fm-8532-24p8, CGA-p6rv-vx2m-hx94, CGA-q46r-8hq6-3xp7, CGA-q928-fmf8-gh9f, CGA-qcpq-732m-7cpf, CGA-qg95-8xqc-w4w5, CGA-r4mf-69g2-f6fj, CGA-r6m5-2g49-555c, CGA-rcw3-g422-724x, CGA-rf7v-gh9w-6qx3, CGA-v5h3-xmvr-c9mh, CGA-v8p2-pvj7-wv22, CGA-w258-8c68-j24c, CGA-w3jv-h2gg-q646, CGA-w549-jcpf-wqwf, CGA-w57c-4fw8-cp9v, CGA-w9hc-9f2r-fvqx, CGA-x62h-37pq-qww3, CGA-x8v9-qfxc-4h9r, CGA-xf89-5ccq-xg5w, CGA-627x-pp99-9pxw
- Record: https://cvemate.com/vulnerability/CVE-2026-140391 · JSON: https://cvemate.com/vulnerability/CVE-2026-140391/json

## Description

```text
DOMPurify before 3.4.18 contains a SAFE_FOR_TEMPLATES bypass that allows attackers to smuggle template expressions past sanitization using nested form elements or orphaned end tags. When the sanitized output is reparsed via innerHTML, split braces merge into live {{...}} expressions that Vue or AngularJS evaluate, executing attacker JavaScript in victims' browsers.
```

## Signals

- CVSS: 6.1 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- EPSS: 0.505%, percentile 44.757%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 99)

- chainguard airflow-2 (Chainguard): All versions (No fix recorded)
- chainguard awx (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.8 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.9 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-19.2 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-19.4 (Chainguard): \< 19.4.11-r9
- chainguard gitlab-rails-ce-19.5 (Chainguard): All versions (No fix recorded) \| \< 19.5.9-r10
- chainguard gitlab-rails-ce-19.6 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.8 (Chainguard): All versions (No fix recorded)
- chainguard kibana-8.19 (Chainguard): All versions (No fix recorded) \| \< 8.19.26-r4
- chainguard kibana-8.19-bitnami (Chainguard): All versions (No fix recorded) \| \< 8.19.26-r4
- chainguard kibana-9.4 (Chainguard): All versions (No fix recorded) \| \< 9.4.10-r2
- chainguard kibana-9.5 (Chainguard): All versions (No fix recorded) \| \< 9.5.7-r4
- chainguard kubeflownotebookswg-jupyter-scipy (Chainguard): All versions (No fix recorded)
- chainguard langfuse-4-worker (Chainguard): All versions (No fix recorded)
- chainguard langfuse-fips-4-worker (Chainguard): All versions (No fix recorded) \| \< 4.84.0-r5
- chainguard librechat (Chainguard): All versions (No fix recorded) \| \< 0.8.8-r15
- chainguard nextcloud-server-32 (Chainguard): \< 32.0.15-r6
- chainguard nextcloud-server-33 (Chainguard): All versions (No fix recorded)
- chainguard nextcloud-server-33-app-bruteforcesettings (Chainguard): All versions (No fix recorded)

## References

- <https://github.com/cure53/DOMPurify/security/advisories/GHSA-qm7q-q8h9-jg8q>
- <https://www.vulncheck.com/advisories/dompurify-before-3.4.18-safe-for-templates-bypass-leading-to-xss>
- <https://security-tracker.debian.org/tracker/CVE-2026-140391>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-140391>
- <https://github.com/cure53/DOMPurify>
- <https://ubuntu.com/security/CVE-2026-140391>
- <https://www.cve.org/CVERecord?id=CVE-2026-140391>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/140xxx/CVE-2026-140391.json>

---

Data as of 2026-12-05T09:32:00.460Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
