Reflected XSS through delivery macro re-injection
The ad-delivery engine substituted macros in a way that let markup supplied through the referer parameter be inserted unescaped into generated banner output after the initial input encoding. An unauthenticated attacker could craft a delivery URL so that a visitor's browser ran attacker-controlled JavaScript in the delivery origin.
- Fixed in 3 hours
- Disclosed after 13 days
Summary by the program
Description
HackerOne community member Ahmed Najeh (im4x) reported reflected XSS through macro re-injection in the ad-delivery engine. An unauthenticated attacker could place a macro token in the source or target request parameter and supply malicious markup through the referer parameter. Macro substitution could then insert unescaped markup into generated banner output after the initial input encoding. A visitor following a crafted delivery URL could execute attacker-controlled JavaScript in the delivery origin. Exploitation requires an active banner but does not require its template to contain the referer macro.
Resolution
Source values are now URL-encoded in impression beacon URLs, and request-supplied targets are restricted to ASCII letters, digits and underscores. Macro replacement uses a single pass, preventing inserted values from being interpreted as further macro instructions. The legacy referer macro output is unchanged.
Security advisory: https://www.revive-adserver.com/security/revive-sa-2026-005
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely macro substitution ran after input encoding and could re-inject unescaped request-supplied values into banner output, with replacement not limited to a single pass.
Impact
A visitor following a crafted delivery URL could have attacker-controlled JavaScript executed in the delivery origin; an active banner is needed, but its template does not have to contain the referer macro.
What the attacker needed
An active banner; victim follows a crafted delivery URL; no account needed
The fix
Source values are now URL-encoded in impression beacon URLs, request-supplied targets are limited to ASCII letters, digits and underscores, and macro replacement uses a single pass.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A macro is a placeholder token in an ad link that the server swaps for a real value, such as the page the visitor came from. Here the server swapped in a value that contained HTML or script and did not clean it, so the browser treated it as part of the page. That let an attacker run their own JavaScript on the site's domain for anyone who opened a prepared link.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.