Html injection on subscription email
The newsletter subscription form did not sanitise the name field, so an attacker could inject HTML that appeared in the confirmation email. This allowed the attacker to alter the email's visible content and send a phishing message from the legitimate sender address.
Originally disclosed on HackerOne
- Disclosed after 2.9 years
Summary by the program
A flaw in getresponse service allowed an attacker to inject HTML code in the Name field when subscribing to cs.money newsletter.
Summary by the researcher
Due to a lack of sanitization in the name field of the CSMONEY newsletter registration form, it was possible to inject HTML codes, which were reflected in the confirmation email.
An attacker could insert a payload that completely modifies the visible HTML of the email, causing any victim to receive the malicious email directly from [email protected], facilitating phishing attacks.
{██████████}
What the report shows
The target is the CS Money newsletter subscription flow, which runs through a service called getresponse. The feature under test is the subscription form where a new subscriber supplies a Name, and the confirmation email that the service sends back to that address.
The researcher found that the Name field was not sanitised. HTML entered there was carried into the confirmation email and rendered as markup rather than as text. Because the email is generated and delivered by the newsletter system, the injected content arrives from the sender address [redacted], which is what makes the flaw useful to an attacker.
The report describes the outcome in one sentence: a payload could completely rewrite the visible HTML of the email, so any victim receives a malicious message that appears to come directly from CS Money. That turns the subscription form into a delivery channel for phishing.
The program's own summary confirms the same picture: a flaw in the getresponse service allowed HTML injection through the Name field during newsletter subscription. The report is rated medium severity and was paid a bounty of 300.00 USD. It was disclosed on 23 January 2024. The report does not describe a fix, and it does not include the exact payload that was used.
The only reference the researcher gives to the rendered result is the archive URL of the newsletter:
https://email.cs.money/archive/csmoney_eng
The researcher gives the archive URL of the CS Money newsletter as the only reference to the rendered result. The report does not spell out the request that submitted the name, the parameters of the subscription endpoint, or the raw email source.
Root cause
The likely root cause is missing output encoding on the Name value. The likely root cause is missing output encoding on the Name value before it is placed into the confirmation email. Any <, > or attribute syntax in the name is therefore interpreted by the mail client as markup instead of being displayed literally.
The program attributes the flaw to the getresponse service. Whether the escaping is missing in the CS Money form, in the handover to that service, or in the template that renders the email is not stated in the report.
Impact
An attacker who controls the Name value controls part of the HTML of an email that is sent by CS Money's own infrastructure. The report's claim is strong but bounded: the payload can completely modify the visible HTML of the email. That supports phishing, because the victim sees a message from [redacted] whose visible HTML has been shaped by the attacker.
The report does not claim script execution in the mail client, theft of credentials, or access to other users' data. The impact it argues for is deception of the recipient under the sender's brand.
How this kind of bug works
HTML injection is the failure to keep untrusted data out of a markup context. Whenever a value that a user can influence is concatenated into an HTML document, the characters that carry structural meaning in HTML stop being data and start being syntax. A name of Alice is text; a name containing a tag or an attribute is markup, and the renderer has no way to tell the two apart unless the value was encoded first.
Email makes this worse in two ways. First, the message is rendered by a mail client, and clients vary in how much markup and styling they honour, so a payload that does nothing in one client may render fully in another. Second, the message is authenticated by the sending domain. A newsletter sent from a branded address carries the reputation of that brand, so injected content inherits trust the attacker could not obtain on their own domain.
The same class appears wherever a stored value is echoed into a page or a template: profile names, support ticket subjects, invoice references, comment authors, and notification emails built from any of these. The defence is contextual output encoding at the point of rendering, plus input validation that rejects or strips markup where a plain value is expected.
How to test for it
- Identify every field whose value is likely to be echoed back: display names, subject lines, company names, addresses, and free-text notes on account or subscription forms.
- Submit a benign marker first, such as a distinctive word, and confirm where it appears: a confirmation email, a notification to another user, an admin panel, a public archive page.
- Replace the marker with a minimal, harmless markup probe, for example a pair of emphasis tags around a word, and observe whether the rendered output shows the word styled or shows the literal tag characters.
- If the tags render, escalate carefully to a link or an image reference pointing at a host you control, so you can demonstrate that the markup is live rather than merely stored.
- Check the raw source of the email as well as the rendered view, since some clients hide markup that is present in the message body.
- Test the same value in every place it surfaces, because escaping is often applied in one template and forgotten in another.
A positive result is markup that renders as markup in a context the victim will see, ideally with a working link or image load that proves the injection is not filtered. Common false positives are values that appear only inside an HTML-escaped context, tags that are stripped by a sanitiser but whose text remains, and markup that renders in a preview tool but is neutralised in the actual delivered message. Also rule out self-XSS: if the payload only affects the submitter's own view, the impact is much weaker.
How it is fixed
Encode the value for the context in which it is rendered, so that characters with structural meaning in HTML are emitted as entities. Apply that encoding in the email template itself, not only at the form, because the template is the last place the value becomes markup. Where a field should never contain markup, validate it on input as well, rejecting or stripping tags and attribute syntax. If rich content is genuinely required, pass it through a well-maintained sanitiser with an allowlist of elements and attributes, and keep the sanitiser current. Finally, review every template that consumes the same stored value, since a fix in one notification path does not protect the others.
Hunting notes
This class hides in flows that cross a boundary between systems: a form on one platform feeding a template on another, such as a CRM, a mailing list provider or a ticketing tool. Those handovers are where encoding is most often assumed to have happened on the other side. Subscription confirmations, password reset messages, invitations to other users, and public archive pages of newsletters are all good places to look, because they render stored values in a branded context.
Recon signals include any feature that sends mail on your behalf, any field that appears in a message you receive, and any public archive or web view of an email. Third-party marketing or newsletter integrations named in page source or in email headers are worth noting, since the report here points at exactly such a service.
To make the report land, show the delivered message, the sender address, and the rendered result side by side, and explain what a recipient would believe on seeing it. Keep the payload harmless: a link to a domain you control or a visible text change is enough to prove the point, and it avoids arguments about whether script execution was achieved. State the impact in terms of what the victim is tricked into doing, and note any limits you observed, such as which mail clients rendered the markup.
What happened, in plain words
Like many companies, it sends a newsletter: a regular email to people who have signed up for it. The sign-up form asks for a Name, and the newsletter system then sends a confirmation email back to the address that was entered.
The newsletter runs through a service called getresponse. The researcher tested the Name field on that subscription form and found it was not sanitised. Sanitising means cleaning up what a user types so that characters with a special meaning are neutralised before the value is used anywhere. Because that cleaning was missing, HTML code typed into the Name field was carried into the confirmation email and rendered as markup, that is, as formatting and structure, rather than shown as plain text.
HTML is the language that describes how a web page or an email body looks: which text is bold, which text is a link, where an image goes. Normally a name is just text. If the name contains HTML tags, and nothing escapes them, the email program treats them as instructions instead of as letters.
The important part is who sends the email. It is generated and delivered by the newsletter system, so it arrives from the sender address [redacted]. A victim sees a message that genuinely comes from CS Money's own infrastructure, but whose visible content was shaped by the attacker. The report sums this up in one sentence: a payload could completely rewrite the visible HTML of the email, so any victim receives a malicious message that appears to come directly from CS Money. That turns the subscription form into a delivery channel for phishing, where an attacker sends a fake but convincing message to trick someone into clicking a link or handing over information.
The program's own summary agrees: a flaw in the getresponse service allowed HTML injection through the Name field during newsletter subscription. The report is rated medium severity and was paid a bounty of 300.00 USD. It was disclosed on 23 January 2024. The report does not describe a fix, and it does not include the exact payload that was used.
The only reference the researcher gives to the rendered result is the public archive of the newsletter:
https://email.cs.money/archive/csmoney_eng
A newsletter archive is a web page where past issues are published so anyone can read them. The researcher gives that link as the only reference to the rendered result. The report does not spell out the request that submitted the name, the parameters of the subscription endpoint, or the raw email source.
Why it happens
The likely root cause is missing output encoding on the Name value. The likely root cause is missing output encoding on the Name value before it is placed into the confirmation email. Escaping means converting characters such as < and > into harmless codes so they display as characters instead of being read as tags. Without it, any tag or attribute syntax in the name is interpreted by the mail client as markup.
The program attributes the flaw to the getresponse service. Whether the escaping is missing in the CS Money form, in the handover to that service, or in the template that renders the email is not stated in the report.
What an attacker gains
An attacker who controls the Name value controls part of the HTML of an email sent by CS Money's own infrastructure. The report's claim is strong but bounded: the payload can completely modify the visible HTML of the email. That supports phishing, because the victim sees a message from [redacted] whose visible HTML has been shaped by the attacker.
The report does not claim script execution in the mail client, theft of credentials, or access to other users' data. The impact it argues for is deception of the recipient under the sender's brand.
In general, how this kind of bug works
HTML injection is the failure to keep untrusted data out of a markup context. Whenever a value a user can influence is pasted into an HTML document, the characters that carry structural meaning in HTML stop being data and start being syntax. A name of Alice is text; a name containing a tag or an attribute is markup, and the renderer has no way to tell the two apart unless the value was encoded first. A useful comparison is a form letter where someone fills in the blank for your name: if they write instructions for the printer instead of a name, the printer may follow them.
Email makes this worse in two ways. First, the message is rendered by a mail client, and clients vary in how much markup and styling they honour, so a payload that does nothing in one client may render fully in another. Second, the message is authenticated by the sending domain. A newsletter sent from a branded address carries the reputation of that brand, so injected content inherits trust the attacker could not obtain on their own domain.
The same class appears wherever a stored value is echoed into a page or a template: profile names, support ticket subjects, invoice references, comment authors, and notification emails built from any of these. The defence is contextual output encoding at the point of rendering, plus input validation that rejects or strips markup where a plain value is expected.
How to test for it
- Identify every field whose value is likely to be echoed back: display names, subject lines, company names, addresses, and free-text notes on account or subscription forms.
- Submit a benign marker first, such as a distinctive word, and confirm where it appears: a confirmation email, a notification to another user, an admin panel, a public archive page.
- Replace the marker with a minimal, harmless markup probe, for example a pair of emphasis tags around a word, and observe whether the rendered output shows the word styled or shows the literal tag characters.
- If the tags render, escalate carefully to a link or an image reference pointing at a host you control, so you can demonstrate that the markup is live rather than merely stored.
- Check the raw source of the email as well as the rendered view, since some clients hide markup that is present in the message body.
- Test the same value in every place it surfaces, because escaping is often applied in one template and forgotten in another.
A positive result is markup that renders as markup in a context the victim will see, ideally with a working link or image load that proves the injection is not filtered. Common false positives are values that appear only inside an HTML-escaped context, tags that are stripped by a sanitiser but whose text remains, and markup that renders in a preview tool but is neutralised in the actual delivered message. Also rule out self-XSS: if the payload only affects the submitter's own view, the impact is much weaker.
How it is fixed
Encode the value for the context in which it is rendered, so that characters with structural meaning in HTML are emitted as entities. Apply that encoding in the email template itself, not only at the form, because the template is the last place the value becomes markup. Where a field should never contain markup, validate it on input as well, rejecting or stripping tags and attribute syntax. If rich content is genuinely required, pass it through a well-maintained sanitiser with an allowlist of elements and attributes, and keep the sanitiser current. Finally, review every template that consumes the same stored value, since a fix in one notification path does not protect the others.
Where to look
This class hides in flows that cross a boundary between systems: a form on one platform feeding a template on another, such as a CRM, a mailing list provider or a ticketing tool. Those handovers are where encoding is most often assumed to have happened on the other side. Subscription confirmations, password reset messages, invitations to other users, and public archive pages of newsletters are all good places to look, because they render stored values in a branded context.
Recon signals include any feature that sends mail on your behalf, any field that appears in a message you receive, and any public archive or web view of an email. Third-party marketing or newsletter integrations named in page source or in email headers are worth noting, since the report here points at exactly such a service.
To make the report land, show the delivered message, the sender address, and the rendered result side by side, and explain what a recipient would believe on seeing it. Keep the payload harmless: a link to a domain you control or a visible text change is enough to prove the point, and it avoids arguments about whether script execution was achieved. State the impact in terms of what the victim is tricked into doing, and note any limits you observed, such as which mail clients rendered the markup.
Glossary
- HTML: the language that describes the structure and formatting of a web page or email body.
- Sanitisation: cleaning user input so that characters with special meaning cannot act as code or markup.
- Output encoding (escaping): converting special characters into harmless codes at the moment they are rendered.
- Markup: the tags and attributes in HTML that tell a renderer how to display content.
- Payload: the crafted input an attacker submits to trigger a flaw.
- Phishing: a deceptive message that impersonates a trusted sender to trick the recipient into acting.
- Newsletter: a regular email sent to people who have subscribed to it.
- Newsletter archive: a public web page where past newsletter issues are published.
- Mail client: the program or service that displays email, such as a webmail interface or desktop app.
- Sender address: the email address shown as the origin of a message.
- Template: a reusable document with placeholders that are filled in with values, such as a name.
- Endpoint: the specific address on a server that a request is sent to.
- Parameter: a named value sent with a request, such as a form field.
- Third-party service: an outside company whose platform handles part of a business's operations.
- CRM: customer relationship management software used to track contacts and communications.
- Self-XSS: a flaw where injected content only affects the person who submitted it, limiting the impact.
- False positive: a test result that looks like a vulnerability but is not exploitable in practice.
- Allowlist: a list of items explicitly permitted, with everything else rejected.
- Severity: a rating of how serious a vulnerability is, here medium.
- Bounty: a payment made to a researcher who reports a valid vulnerability.