Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-25987

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-25987
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 11:42 UTC · Revision 1

Source evidence

CVE-2021-25987

core-osv · Original source

Published 30 Nov 2021, 14:15 UTC

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.

osv:CVE-2021-25987
Complete source record
{
  "id": "19f72a93ae670bc4bfa343cba46bab1efe8b8d16e824f43984134d205744b8b6",
  "url": "https://osv.dev/vulnerability/CVE-2021-25987",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-25987",
    "summary": "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.",
    "evidence": "osv:CVE-2021-25987",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-25987",
      "aliases": [
        "CVE-2021-25987",
        "GHSA-q54r-r9pr-w7qv"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/hexojs/hexo",
              "type": "GIT",
              "events": [
                {
                  "introduced": "3fdc19bcaaebe7b84d615490c0c87b371331e127"
                },
                {
                  "last_affected": "b65a5623b7f7b539b48bf6ebdab73885841a120f"
                },
                {
                  "fixed": "5170df2d3fa9c69e855c4b7c2b084ebfd92d5200"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:hexo:hexo:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "0.0.1"
                      },
                      {
                        "last_affected": "5.4.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "5170df2d3fa9c69e855c4b7c2b084ebfd92d5200"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "5.4.0",
            "5.3.0",
            "5.2.0",
            "5.1.1",
            "5.1.0",
            "5.0.2",
            "5.0.1",
            "5.0.0",
            "4.2.0",
            "4.1.1",
            "4.1.0",
            "4.0.0",
            "3.9.0",
            "3.8.0",
            "3.7.1",
            "3.7.0",
            "3.6.0",
            "3.5.0",
            "3.4.4",
            "3.4.3",
            "3.4.2",
            "3.4.1",
            "3.4.0",
            "3.3.9",
            "3.3.8",
            "3.3.7",
            "3.3.6",
            "3.3.5",
            "3.3.0",
            "3.2.2",
            "3.2.1",
            "3.2.0",
            "3.2.0-beta.2",
            "3.2.0-beta.1",
            "3.1.1",
            "3.1.0",
            "3.0.1",
            "3.0.0",
            "3.0.0-rc.4",
            "3.0.0-rc.3",
            "3.0.0-rc.2",
            "3.0.0-rc.1",
            "3.0.0-beta.4",
            "3.0.0-beta.3",
            "3.0.0-beta.2",
            "3.0.0-beta.1",
            "2.8.3",
            "2.8.2",
            "2.8.1",
            "2.8.0",
            "2.7.1",
            "2.7.0",
            "2.6.3",
            "2.6.2",
            "2.6.1",
            "2.5.7",
            "2.5.6",
            "2.5.5",
            "2.5.4",
            "2.5.3",
            "2.5.0",
            "2.4.5",
            "2.4.4",
            "2.4.3",
            "2.4.2",
            "2.4.1",
            "2.4.0",
            "2.3.0",
            "2.1.0",
            "2.0.7",
            "2.0.6",
            "2.0.5",
            "2.0.4",
            "2.0.3",
            "2.0.2",
            "2.0.1",
            "2.0.0",
            "1.2.4",
            "1.2.3",
            "1.2.2",
            "1.2.1",
            "1.2.0",
            "1.1.4",
            "1.1.3",
            "1.1.2",
            "1.1.1",
            "1.1.0",
            "1.0.9",
            "1.0.8",
            "1.0.7",
            "1.0.6",
            "1.0.5",
            "1.0.4",
            "1.0.2",
            "1.0.1",
            "1.0.0",
            "0.5.12",
            "0.5.11",
            "0.5.10",
            "0.5.9",
            "0.5.8",
            "0.5.7",
            "0.5.6",
            "0.5.5",
            "0.5.4",
            "0.5.3",
            "0.5.2",
            "0.5.1",
            "0.5.0",
            "0.4.5",
            "0.4.4",
            "0.4.3",
            "0.4.2",
            "0.4.1",
            "0.4.0",
            "0.3.2",
            "0.3.1",
            "0.3.0",
            "0.2.1",
            "0.2.0",
            "0.1.11",
            "0.1.10",
            "0.1.9",
            "0.1.8",
            "0.1.7",
            "0.1.6",
            "0.1.5",
            "0.1.4",
            "0.1.3",
            "0.1.2",
            "0.1.1",
            "0.1.0",
            "0.0.6",
            "0.0.5",
            "0.0.4",
            "0.0.3",
            "0.0.2",
            "0.0.1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-25987.json"
          }
        }
      ],
      "modified": "2026-10-20T10:54:34.504135055Z",
      "provider": "osv",
      "references": [
        "https://www.whitesourcesoftware.com/vulnerability-database/CVE-2021-25987",
        "https://github.com/hexojs/hexo/commit/5170df2d3fa9c69e855c4b7c2b084ebfd92d5200"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-25987",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 385625,
  "published_at": "2021-11-30T14:15:07.53+00:00"
}