Summary
OpenMage Magento-LTS can serve review RSS feeds as HTML without escaping data submitted in review fields, allowing stored cross-site scripting. An unauthenticated guest may be able to place script content in a review that runs in an administrator's browser when they open the pending-reviews feed.
Affected context
The issue affects OpenMage Magento-LTS releases before 20.18.2 and the 21.0.0 beta releases before 21.0.0-beta3. It occurs when review data is included in an RSS feed that is served with a text/html content type and is not safely encoded for the response context. Risk arises when an administrator views the pending-reviews feed.
Exploit preconditions
- Attack surface: Product review submission and the pending-reviews RSS feed
- Required access: A guest can submit a product review; authentication is not required for that submission
- Trigger point: An administrator opens the affected feed
- Why exploitation is possible: Attacker-controlled review fields are rendered without adequate escaping in a response treated as HTML
Why this happens
The application places untrusted review data into an RSS response without context-appropriate output encoding, while serving the response with a text/html content type. A browser may therefore interpret crafted entry data as active markup or script. This is a stored cross-site scripting flaw mapped to CWE-79: Improper Neutralization of Input During Web Page Generation.
Potential impact
- Script may run in an administrator's browser when the pending-reviews feed is viewed
- An attacker could potentially act with the administrator's privileges or compromise the administrator's account
- Administrative actions or sensitive information may be exposed, depending on the application's protections
General mitigation guidance
Defensive patterns include consistently applying context-aware output encoding to all untrusted feed fields and serving feeds with an appropriate non-HTML content type. Validate and constrain review input as a supplementary measure, but do not rely on input filtering in place of output encoding. Consider safer feed-generation libraries, restrict unnecessary administrative exposure to feeds, and apply least privilege to administrator accounts and sessions.
How teams detect issues like this
- Review feed-generation code for unescaped user-controlled values, especially review nicknames, titles, and text
- Use static analysis rules that identify untrusted data flowing into HTML or XML responses without context-appropriate encoding
- Check that RSS endpoints set an appropriate content type and do not render feed content as HTML
- Add security tests using review data containing markup-like characters and enforce output-encoding and response-header policies in code review and CI

