Overview
A stored Cross-Site Scripting (XSS) vulnerability was identified in Anowave Google Tag Manager Enhanced Ecommerce for Magento 2.
The vulnerability affected the handling and rendering of tracking data associated with Magento orders. Under certain conditions, an unauthenticated visitor could submit manipulated tracking data that would subsequently be stored and rendered in the Magento Admin order view.
Security Impact
Successful exploitation could result in JavaScript execution in the browser of an administrator viewing an affected order.
Depending on the administrator's privileges and the Magento environment, this could potentially compromise administrative sessions or enable unauthorized administrative actions.
Affected Components
The vulnerability involved two areas of the extension:
- The order tracking state endpoint, which processed client-submitted tracking information.
- The Magento Admin order view, which displayed stored tracking information.
Resolution
The vulnerability has been addressed through the following security improvements:
- Order association is now determined exclusively through the active Magento checkout session.
- Client-submitted transaction identifiers are validated against the corresponding session order.
- The endpoint accepts POST requests and uses Magento's standard CSRF validation.
- Stored tracking data is rendered using context-appropriate escaping.
- Dynamic JSON data is parsed and rendered as text rather than inserted as executable HTML.
Recommended Action
Merchants using an affected version should upgrade to the fixed version listed in this advisory.
We recommend updating as soon as possible to ensure that the security improvements are applied.
Acknowledgements
We thank Ćukasz Bajsarowicz - the security researcher who responsibly reported this vulnerability and helped improve the security of Anowave products.
Disclosure
This advisory is published to inform Anowave customers about the vulnerability, its potential impact and the available remediation.