# GHSA-xx4c-jj58-r7x6: Inefficient Regular Expression Complexity in Validator.js

- Severity: Medium 5.3 (CVSS:3.0, scored by GitHub) `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2021-11-19T20:14:23.000Z
- Modified: 2022-07-12T00:11:53.000Z
- Weaknesses: CWE-1333

## Description

### Impact
Versions of `validator` prior to 13.7.0 are affected by an inefficient Regular Expression complexity  when using the `rtrim` and `trim` sanitizers.

### Patches
The problem has been patched in validator 13.7.0

(As written by GitHub Advisory Database.)

## Affected

- validator (npm): from 11.1.0 before 13.7.0

## References

- <https://github.com/validatorjs/validator.js/security/advisories/GHSA-xx4c-jj58-r7x6> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-3765> (advisory)
- <https://github.com/validatorjs/validator.js/issues/1599> (web)
- <https://github.com/validatorjs/validator.js/pull/1738> (web)
- <https://github.com/validatorjs/validator.js> (package)
- <https://huntr.dev/bounties/c37e975c-21a3-4c5f-9b57-04d63b28cfc9> (web)

## Sources

- GitHub Advisory Database: [GHSA-xx4c-jj58-r7x6](https://github.com/advisories/GHSA-xx4c-jj58-r7x6), CC-BY-4.0, modified 2022-07-12

---

Page: https://cve.day/GHSA-xx4c-jj58-r7x6 · Whole record: https://cve.day/GHSA-xx4c-jj58-r7x6.json · Rebuilt by cve.day 2026-11-25T22:56:47.111Z
