CVE-2026-31822
Cross-Site Scripting in Sylius ApiLoginController JSON Response
Publication date: 2026-03-10
Last updated on: 2026-03-11
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| sylius | sylius | From 2.0.0 (inc) to 2.0.16 (exc) |
| sylius | sylius | From 2.1.0 (inc) to 2.1.12 (exc) |
| sylius | sylius | From 2.2.0 (inc) to 2.2.3 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-79 | The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a cross-site scripting (XSS) issue in the Sylius eCommerce Framework, specifically in the shop checkout login form managed by the ApiLoginController Stimulus controller.
When a login attempt fails, the AuthenticationFailureHandler returns a JSON response containing a message field. This message is rendered into the webpage's DOM using innerHTML, which allows any HTML or JavaScript code included in that message to be executed by the browser.
This means an attacker could inject malicious scripts that run in the context of the user's browser, potentially leading to unauthorized actions or data theft.
How can this vulnerability impact me? :
This vulnerability can allow attackers to execute arbitrary JavaScript in the context of the affected website for users who experience a failed login attempt.
Potential impacts include theft of user credentials, session hijacking, defacement of the website, or redirection to malicious sites.
Because the vulnerability occurs during login failure handling, it could be exploited to target users attempting to authenticate, potentially compromising their accounts or personal data.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
I don't know
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, upgrade Sylius to version 2.0.16, 2.1.12, 2.2.3 or above where the issue is fixed.