Moderate severityNVD Advisory· Published Mar 14, 2026· Updated Mar 19, 2026
Vulnogram - Stored Cross-Site Scripting via Comment Hypertext
CVE-2026-32774
Description
Vulnogram 1.0.0 contains a stored cross-site scripting vulnerability in comment hypertext handling that allows attackers to inject malicious scripts. Remote attackers can inject XSS payloads through comments to execute arbitrary JavaScript in victims' browsers.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
vulnogramnpm | <= 1.0.0 | — |
Affected products
1Patches
12f0e21b113c5fix: sanitize comment hypertext server-side to prevent stored XSS
2 files changed · +26 −2
package.json+1 −0 modified@@ -40,6 +40,7 @@ "pug": "^3.0.3", "querymen": "^2.1.4", "sanitize-filename": "^1.6.3", + "sanitize-html": "^2.17.1", "socket.io": "^4.8.3", "uglify-es": "^3.3.10" },
routes/comments.js+25 −2 modified@@ -2,6 +2,29 @@ const express = require('express'); const csurf = require('csurf'); var csrfProtection = csurf(); const crypto = require('crypto'); +const sanitizeHtml = require('sanitize-html'); + +var sanitizeComment = function (dirty) { + return sanitizeHtml(dirty, { + allowedTags: [ + 'b', 'strong', 'i', 'em', 'u', + 'p', 'div', 'br', 'span', 'dd', + 'h1', 'h2', 'h3', 'blockquote', + 'ul', 'ol', 'li', + 'a', 'img', + 'table', 'thead', 'tbody', 'tfoot', 'tr', 'td', 'th', + 'code', 'pre' + ], + allowedAttributes: { + 'a': ['href', 'target', 'title', 'rel'], + 'img': ['src', 'alt', 'width', 'height'], + 'td': ['colspan', 'rowspan'], + 'th': ['colspan', 'rowspan'] + }, + allowedSchemes: ['http', 'https', 'mailto'], + allowProtocolRelative: false + }); +}; var random_slug = function () { return crypto.randomBytes(13).toString('base64').replace(/[\+\/\=]/g, '-'); @@ -66,7 +89,7 @@ module.exports = function (Document, opts) { updatedAt: dt, author: username, slug: slug, - hypertext: text, + hypertext: sanitizeComment(text), }], $position: 0 } } @@ -92,7 +115,7 @@ module.exports = function (Document, opts) { q['comments.author'] = username; var ret = await Document.findOneAndUpdate(q, { '$set': { - "comments.$.hypertext": text, + "comments.$.hypertext": sanitizeComment(text), "comments.$.updatedAt": date } }, {
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- github.com/Vulnogram/Vulnogram/security/advisories/GHSA-pg4p-2985-gvxrghsathird-party-advisoryWEB
- github.com/advisories/GHSA-vggc-6pg2-xvp9ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-32774ghsaADVISORY
- www.vulncheck.com/advisories/vulnogram-stored-cross-site-scripting-via-comment-hypertextghsathird-party-advisoryWEB
- github.com/Vulnogram/Vulnogram/commit/2f0e21b113c58124084c7b74c9768fc241126a05ghsaWEB
News mentions
0No linked articles in our index yet.