Category

Input Sanitization

Security vulnerabilities and automated fixes for input sanitization issues

5 posts found

critical5 min

How Cross-Site Scripting (XSS) happens in JavaScript sanitization functions and how to fix it

A critical XSS vulnerability was discovered in the `sanitizeInput()` function in script.js, where only angle brackets were being escaped while quotes, ampersands, and backticks remained unprotected. This incomplete sanitization allowed attackers to craft payloads using event handlers and template literals that bypassed the security controls entirely. The fix implements comprehensive HTML entity encoding for all XSS-relevant characters.

#xss#javascript#input-sanitization+3 more
A
anupamme
Sep 6, 2026
high8 min

How Command Injection Vulnerabilities Happen in Node.js Child Process Calls and How to Fix Them

A critical command injection vulnerability in `scripts/setup-harness.js` used a generic `run()` function that accepted user-controlled command strings passed directly to `spawnSync()`, creating an exploit primitive. The fix refactors this into hardened, command-specific functions (`runGit()` and `runNode()`) that eliminate the attack surface by pre-selecting the executable and disabling shell interpretation.

#command-injection#nodejs#child-process+2 more
A
anupamme
Aug 31, 2026
medium7 min

How Path Traversal and Filename Injection Happens in Python File Handling and How to Fix It

A medium-severity path traversal vulnerability in `PainterNode/painter_node.py` allowed attackers to reference files outside the intended directory by exploiting a broken `isFileName()` validation function. The original logic used incorrect boolean operators, meaning the filename guard never actually blocked malicious inputs like `../../../etc/passwd` or paths containing backslashes. The fix rewrites the condition with proper logic and adds explicit checks for path separator characters and direc

#path-traversal#python#comfyui+2 more
A
anupamme
Aug 27, 2026
critical6 min

How DOM-Based XSS Happens in jQuery tagsInput() and How to Fix It

A DOM-based Cross-Site Scripting (XSS) vulnerability was discovered in the VvvebJs web editor's `inputs.js` file where the jQuery `tagsInput()` function at line 932 directly inserted user-controlled data into the DOM without sanitization. The fix applies HTML entity encoding to all string values before they reach the DOM, preventing malicious script injection while preserving legitimate tag functionality.

#xss#javascript#jquery+4 more
A
anupamme
Aug 17, 2026
critical9 min

How shell metacharacter injection happens in Node.js SSH provisioning and how to fix it

A critical command injection vulnerability was discovered in `services/onuProvisionService.js`, where the `sanitizeCliInput` function only stripped newlines and carriage returns from user input before passing it to SSH shell streams. Attackers could inject shell metacharacters like semicolons, pipes, and backticks to execute arbitrary commands on network infrastructure devices such as ONU/ONT hardware. The fix expands the sanitization regex to strip all dangerous shell metacharacters, closing th

#command-injection#nodejs#ssh+4 more
A
anupamme
Aug 1, 2026