VYPR
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.

PackageAffected versionsPatched versions
vulnogramnpm
<= 1.0.0

Affected products

1

Patches

1
2f0e21b113c5

fix: sanitize comment hypertext server-side to prevent stored XSS

https://github.com/Vulnogram/Vulnogramscott mooreMar 13, 2026via ghsa
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

News mentions

0

No linked articles in our index yet.