# CVE-2021-23425: Regular Expression Denial of Service (ReDoS)

- Severity: Medium 5.3 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.93%, higher than 80% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2021-08-18T16:15:11.284Z
- Modified: 2026-06-17T03:38:44.400Z
- Also known as: GHSA-38fc-wpqx-33j7
- Weaknesses: CWE-400
- Assigned by: snyk

## Description

All versions of package trim-off-newlines are vulnerable to Regular Expression Denial of Service (ReDoS) via string processing.

(As written by CVE List.)

## Affected

- trim-off-newlines: before unspecified
- trim-off-newlines (npm): before 1.0.3
- trim-off-newlines_project trim-off-newlines: before 1.0.3

## Every score

- snyk: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L/E:P`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:N/A:P`

## References

- <https://snyk.io/vuln/SNYK-JS-TRIMOFFNEWLINES-1296850> (exploit, third-party-advisory, web)
- <https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1567197> (exploit, third-party-advisory, web)
- <https://github.com/stevemao/trim-off-newlines/blob/master/index.js%23L6> (broken-link, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-23425> (advisory)
- <https://github.com/stevemao/trim-off-newlines/pull/3> (web)
- <https://github.com/stevemao/trim-off-newlines> (package)

## Sources

- CVE List: [CVE-2021-23425](https://www.cve.org/CVERecord?id=CVE-2021-23425), CVE Terms of Use, modified 2024-09-16
- GitHub Advisory Database: [GHSA-38fc-wpqx-33j7](https://github.com/advisories/GHSA-38fc-wpqx-33j7), CC-BY-4.0, modified 2025-01-14
- NVD: [CVE-2021-23425](https://nvd.nist.gov/vuln/detail/CVE-2021-23425), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-23425 · Whole record: https://cve.day/CVE-2021-23425.json · Rebuilt by cve.day 2026-11-25T22:58:03.316Z
