CVE-2021-25987
MEDIUM 4.6CVSS 3.1Hexo Vulnerable to XSS
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.
- Published
- 30 Nov 2021
- Last modified
- 17 Jun 2026
- Assigned by
- vulnerabilitylab@mend.io
- NVD status
- Modified
- Weakness
- CWE-79
- Also known as
- GHSA-q54r-r9pr-w7qv
- Sources
- NVDJSONOSV GHSA-q54r-r9pr-w7qvJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | vulnerabilitylab@mend.io (Secondary) | CVSS 3.1 | MEDIUM 5.0 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 4.6 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 4.6 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | LOW 1.9 | AV:L/AC:M/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | hexo | hexocpe:2.3:a:hexo:hexo:*:*:*:*:*:node.js:*:* |
>= 0.0.1, <= 5.4.0 | |
| OSV | npm | hexo | >= 0.0.1, < 6.0.0 | 6.0.0 |
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
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 30 Nov 2021)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 1 Dec 2021)