# CVE-2021-25987: Hexo - Stored XSS

- Severity: Medium 5.0 (CVSS:3.1, scored by Mend) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- 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): 0.34%, higher than 29% of CVEs (2026-12-01)
- Published: 2021-11-30T13:50:09.000Z
- Modified: 2026-06-17T03:42:44.230Z
- Also known as: GHSA-q54r-r9pr-w7qv
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: Mend

## Description

Hexo versions 0.0.1 to 5.4.0 are vulnerable against stored XSS. The post “body” and “tags” don’t sanitize malicious javascript during web page generation. Local unprivileged attacker can inject arbitrary code.

(As written by CVE List.)

## Affected

- Hexo Hexo: from unspecified up to 5.4.0; from next of 0.0.1 before unspecified; from 0.0.1 up to 5.4.0
- hexo (npm): from 0.0.1 before 6.0.0

## Every score

- Mend: CVSS:3.1 5.0 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 4.6 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:3.1 4.6 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 1.9 Low `AV:L/AC:M/Au:N/C:N/I:P/A:N`

## References

- <https://github.com/hexojs/hexo/commit/5170df2d3fa9c69e855c4b7c2b084ebfd92d5200> (patch, third-party-advisory, web)
- <https://www.whitesourcesoftware.com/vulnerability-database/CVE-2021-25987> (third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-25987> (advisory)
- <https://github.com/hexojs/hexo/issues/4838> (web)
- <https://github.com/hexojs/hexo/pull/4750> (web)
- <https://github.com/hexojs/hexo> (package)

## Sources

- CVE List: [CVE-2021-25987](https://www.cve.org/CVERecord?id=CVE-2021-25987), CVE Terms of Use, modified 2025-04-30
- GitHub Advisory Database: [GHSA-q54r-r9pr-w7qv](https://github.com/advisories/GHSA-q54r-r9pr-w7qv), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2021-25987](https://nvd.nist.gov/vuln/detail/CVE-2021-25987), Public domain, modified 2026-06-17

---

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