November 16, 2026
Stored HTML Injection in Munshi: A Profile Name Reached the Support Email as HTML
A backend-accepted profile value was stored without safe handling, then rendered as HTML when the Contact Support workflow generated an…

By TheWildEye
4 min read
A backend-accepted profile value was stored without safe handling, then rendered as HTML when the Contact Support workflow generated an email.
During a security assessment of Munshi, I identified a stored HTML injection issue in the workflow that builds the Contact Support email.
The application did not expose a normal UI feature to edit the profile name. However, the backend accepted a modified request containing HTML in the name field and persisted that value. Later, when Contact Support was triggered, the support-mail content was loaded through JavaScript and the stored value was rendered as HTML instead of being treated as plain text.
This was not a payload reflected only in the original request. The value remained in storage and appeared again when the support-mail workflow ran. The evidence demonstrated HTML and media rendering in the support-email context. It did not establish arbitrary JavaScript execution, so this write-up describes the demonstrated behavior as stored HTML injection.
The Name Field Was Not Treated as Plain Text
The profile name was expected to be display text. There was no normal UI path to edit it, but the backend accepted a manipulated request containing a custom value in the name field.
The supplied value was saved in MongoDB without meaningful sanitization. The issue therefore crossed two parts of the application: the API accepted and persisted attacker-controlled markup, and the support-mail rendering flow later inserted that stored value into an HTML context without proper output encoding.
The Value Survived the Request
After the modified request was submitted, the updated profile value was confirmed in the backend database. The stored full_name field contained the supplied HTML-capable value rather than a plain-text name.
This is the important distinction between a one-time reflected issue and a stored injection. The value was not limited to the request that introduced it. It remained available to later workflows that consumed the same profile data.
Figure 1: Database record showing the stored value. Account identifiers and contact details are redacted while the affected field remains visible.
The Support Email Rendered the Injected Content
The next step was to trigger the Contact Support action. The application loaded the support-mail content through JavaScript and included the stored profile value in the generated message.
The resulting support email displayed the injected media content. The field was therefore being interpreted as HTML in the support-mail context rather than rendered as inert text.
Figure 2: Contact Support email output. The account email address is redacted; the rendered media and surrounding message remain visible.
Why This Matters
Support email is an operational communication channel. Content displayed there can receive more trust than an arbitrary page or user-generated comment, particularly when it appears inside an established business workflow.
The report identified several ways this behavior could be abused, including misleading banners, masked hyperlinks, external media, tracking resources and phishing-style content. A malicious value could make a support message appear more legitimate while directing a recipient toward attacker-controlled content.
The demonstrated result was the rendering of injected HTML/media in the support-mail flow. The supplied evidence does not show that a recipient clicked a malicious link, disclosed credentials, or that JavaScript executed. Those are potential abuse scenarios, not confirmed outcomes of this test.
The Technical Root Cause
The root cause was unsafe handling of the user-controlled name value across the storage and rendering path.
The backend accepted markup-like input, stored it, and the support-mail template later inserted that value into an HTML context without escaping it. Input validation alone would not be a sufficient fix: even if the API rejects unexpected markup, every output context must still encode untrusted values correctly.
The finding aligns with CWE-79, Improper Neutralization of Input During Web Page Generation, and CWE-116, Improper Encoding or Escaping of Output. CWE-20, Improper Input Validation, is also relevant to the API-side acceptance of unexpected input.
What Needs to Change
The fix belongs at the point where user-controlled data enters the HTML message.
The support-mail template should HTML-escape the name value before inserting it into the message body. If the field is only intended to hold a person's name, the API should also reject unexpected markup and keep the value as plain text throughout the application.
Templates should use context-aware auto-escaping by default. If rich HTML is genuinely required in another workflow, it should be sanitized with a vetted allowlist-based library rather than inserting raw user input. The mail-generation path should also be reviewed to ensure every user-controlled field is handled safely. A restrictive Content Security Policy can provide additional defense in browser-based rendering contexts, but it does not replace correct output encoding.
Vulnerability Reference
Vulnerability: Stored HTML Injection in Support Email Rendering
Product: Munshi
Affected input: Backend name field
Trigger: Contact Support workflow
Primary CWEs: CWE-79, CWE-116
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N
Severity: Medium
Report Date: 15 July 2026
Remediation Status: Fixed
CVE ID: To be assigned
Closing Thoughts
The issue started when the backend accepted a profile value that should have been treated as plain text. It became security-relevant when a later workflow reused that value inside an HTML email without encoding it.
The result was persistent content injection into a trusted support-mail flow. Any user-controlled value that crosses from storage into HTML must be treated as untrusted at the point of rendering. The safest approach is to keep profile data as text and encode it for the exact output context every time it is used.
Researcher: Vyom Nagpal