# CVE-2025-21610: Trix allows Cross-site Scripting via \`javascript:\` url in a link

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.3
- **CVSS:** 5.3 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: None; User interaction: Required; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.73% (percentile 50, 2026-11-26)
- **CWE:** CWE-79
- **Aliases:** GHSA-j386-3444-qgwg
- **Published:** 2025-01-03T16:29:54.939Z
- **Modified:** 2026-06-17T08:43:50.980Z

## Who should check

- Projects that depend on npm package trix (\< 2.1.12)
- Anyone running basecamp trix \< 2.1.12

## Description

Trix is a what-you-see-is-what-you-get rich text editor for everyday writing. Versions prior to 2.1.12 are vulnerable to cross-site scripting when pasting malicious code in the link field. An attacker could trick the user to copy&paste a malicious \`javascript:\` URL as a link that would execute arbitrary JavaScript code within the context of the user's session, potentially leading to unauthorized actions being performed or sensitive information being disclosed. Users should upgrade to Trix editor version 2.1.12 or later to receive a patch. In addition to upgrading, affected users can disallow browsers that don't support a Content Security Policy (CSP) as a workaround for this and other cross-site scripting vulnerabilities. Set CSP policies such as script-src 'self' to ensure that only scripts hosted on the same origin are executed, and explicitly prohibit inline scripts using script-src-elem.

## Affected and fixed versions

- npm `trix`: affected \< 2.1.12; fixed 2.1.12 (osv)
- basecamp trix: \< 2.1.12 (cvelist)

## Mitigation

- Upgrade trix to 2.1.12 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-21610. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-21610.md
Affected: trix < 2.1.12
Fixed in: 2.1.12

Steps:
1. Search this machine and project for trix (npm), basecamp trix: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-21610 being exploited?

There is no confirmed exploitation: CVE-2025-21610 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.73% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-21610?

Medium: CVSS 5.3 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2025-21610?

trix \< 2.1.12.

### Is there a fix for CVE-2025-21610?

Yes. Fixed in 2.1.12. Upgrade trix to 2.1.12 or later.

### How do I check if I'm affected by CVE-2025-21610?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/basecamp/trix/security/advisories/GHSA-j386-3444-qgwg>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2025-21610>
- patch: <https://github.com/basecamp/trix/commit/180c8d337f18e1569cea6ef29b4d03ffff5b5faa>
- patch: <https://github.com/basecamp/trix/commit/c4f0d6f80654603932af6685694f694e96593b93>
- other: <https://gist.github.com/th4s1s/3921fd9c3e324ad9a3e0d846166e3eb8>
- other: <https://github.com/basecamp/trix>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-21610>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-j386-3444-qgwg> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2025-21610> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-21610>
