Skip to content

fix: add output encoding in reformator.js - #2

Open
anupamme wants to merge 1 commit into
artlebedev:masterfrom
anupamme:fix-repo-reformator-v-001-reformator.js
Open

fix: add output encoding in reformator.js#2
anupamme wants to merge 1 commit into
artlebedev:masterfrom
anupamme:fix-repo-reformator-v-001-reformator.js

Conversation

@anupamme

@anupamme anupamme commented Aug 3, 2026

Copy link
Copy Markdown

Summary

Fix high severity security issue in reformator.js.

Vulnerability

Field Value
ID V-001
Severity HIGH
Scanner multi_agent_ai
Rule V-001
File reformator.js:630
Assessment Likely exploitable
CWE CWE-79

Description: The WYSIWYG editor's make() method writes unsanitized HTML content directly into an iframe document using document.write(). The preprocess() function performs no XSS sanitization, allowing attacker-controlled HTML/JavaScript to execute in the page context.

Evidence

Exploitation scenario: Attacker stores malicious HTML in a CMS field rendered into a reformator-managed textarea: .

Scanner confirmation: multi_agent_ai rule V-001 flagged this pattern.

Production code: This file is in the production codebase, not test-only code.

Changes

  • reformator.js

Behavior Preservation

The change is scoped to 1 file on the vulnerable path; it only tightens handling of untrusted input and leaves valid inputs unaffected.


Automated security fix by OrbisAI Security

The WYSIWYG editor's make() method writes unsanitized HTML content directly into an iframe document using document
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant