Skip to content

Internal exception message exposure for login action in Sylius

Low severity GitHub Reviewed Published Dec 5, 2019 in Sylius/Sylius • Updated Jan 9, 2023

Package

composer sylius/sylius (Composer)

Affected versions

< 1.3.14
>= 1.4.0, < 1.4.10
>= 1.5.0, < 1.5.7
>= 1.6.0, < 1.6.3

Patched versions

1.3.14
1.4.10
1.5.7
1.6.3

Description

Internal exception message exposure for login action

Impact

Exception messages from internal exceptions (like database exception) are wrapped by \Symfony\Component\Security\Core\Exception\AuthenticationServiceException and propagated through the system to UI. Therefore, some internal system information may leak and be visible to the customer.

A validation message with the exception details will be presented to the user when one will try to log into the shop.

Patches

Has the problem been patched? What versions should users upgrade to?

Workarounds

The src/Sylius/Bundle/UiBundle/Resources/views/Security/_login.html.twig file should be overridden and lines https://github.com/Sylius/Sylius/blob/1.4/src/Sylius/Bundle/UiBundle/Resources/views/Security/_login.html.twig#L13-L17 should be replaced with

        {% if last_error %}
            <div class="ui left aligned basic segment">
                {{ messages.error(last_error.messageKey) }}
            </div>
        {% endif %}

The messageKey field should be used instead of the message.

References

@pamil pamil published to Sylius/Sylius Dec 5, 2019
Published to the GitHub Advisory Database Dec 5, 2019
Reviewed Jun 16, 2020
Last updated Jan 9, 2023

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:N/A:N

EPSS score

0.054%
(24th percentile)

Weaknesses

CVE ID

CVE-2019-16768

GHSA ID

GHSA-3r8j-pmch-5j2h

Source code

No known source code
Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.