CVE-2022-24743: Insufficient Session Expiration in Sylius

sylius/sylius Updated 02 Oct 2025

Summary

14/03/2022
Yes i
High
7.1

CVE-2022-24743: Insufficient Session Expiration in Sylius. Affects sylius/sylius across 2 version ranges.

>= 1.10.0, < 1.10.11 >= 1.11.0, < 1.11.2

Fixed in 1.10.11 or 1.11.2, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Sylius is an open-source e-commerce platform built on top of Symfony. It provides a flexible and customizable solution for creating online stores. The Sylius package is vulnerable to an insufficient session expiration issue, which can lead to unauthorized password changes and token leaks.

Vulnerability Detail

The vulnerability arises from the failure to nullify the reset password token after a password change. This allows the same token to be used multiple times, potentially resulting in unauthorized password changes and the exposure of existing tokens. An attacker could exploit this vulnerability to gain unauthorized access to user accounts and perform malicious actions.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 1.10.0, < 1.10.11 1.10.11
    composer require sylius/sylius:1.10.11
  • >= 1.11.0, < 1.11.2 1.11.2
    composer require sylius/sylius:1.11.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If you are unable to immediately update to the fixed versions, you can implement a workaround by overwriting the ResetPasswordHandler class. Below is an example of the code to be used:

<?php

namespace App\CommandHandler\Account;

use Sylius\Bundle\ApiBundle\Command\Account\ResetPassword;
use Sylius\Component\Core\Model\ShopUserInterface;
use Sylius\Component\Resource\Metadata\MetadataInterface;
use Sylius\Component\User\Repository\UserRepositoryInterface;
use Sylius\Component\User\Security\PasswordUpdaterInterface;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
use Webmozart\Assert\Assert;

final class ResetPasswordHandler implements MessageHandlerInterface
{
    private UserRepositoryInterface $userRepository;
    private MetadataInterface $metadata;
    private PasswordUpdaterInterface $passwordUpdater;

    public function __construct(
        UserRepositoryInterface $userRepository,
        MetadataInterface $metadata,
        PasswordUpdaterInterface $passwordUpdater
    ) {
        $this->userRepository = $userRepository;
        $this->metadata = $metadata;
        $this->passwordUpdater = $passwordUpdater;
    }

    public function __invoke(ResetPassword $command): void
    {
        // Code to handle password reset
        // ...
        $user->setPasswordResetToken(null);
    }
}

You should register this class in the container as shown in the following YAML configuration:

App\CommandHandler\Account\ResetPasswordHandler:
    arguments:
        - '@sylius.repository.shop_user'
        - !service
              class: Sylius\Component\Resource\Metadata\MetadataInterface
              factory: [ '@sylius.resource_registry', 'get' ]
              arguments:
                    - 'sylius.shop_user'
                    - '@sylius.security.password_updater'
    tags:
        - { name: messenger.message_handler, bus: sylius.command_bus }
        - { name: messenger.message_handler, bus: sylius_default.bus }

This workaround ensures that the reset password token is set to null after a password change, mitigating the vulnerability.

Conclusion

The Sylius package is vulnerable to an insufficient session expiration issue that can lead to unauthorized password changes and token leaks. It is crucial to update the package to the recommended versions or apply the provided workaround to mitigate the vulnerability. For further assistance or support in addressing this vulnerability, please contact DevNack.com.

See every vulnerability recorded for sylius/sylius →

Share this vulnerability

FAQ

The vulnerability allows an attacker to reuse the same reset password token multiple times, potentially leading to unauthorized password changes and token leaks. This can result in unauthorized access to user accounts and malicious actions.

To fix this vulnerability, update the Sylius package to version 1.10.11, 1.11.2, or a later release. Alternatively, you can implement the provided workaround by overwriting the ResetPasswordHandler class.

Yes, you can implement the provided workaround by overwriting the ResetPasswordHandler class. This ensures that the reset password token is properly invalidated after a password change.

For more information, you can open an issue in the Sylius GitHub repository or contact the Sylius team at security@sylius.com.

The vulnerability has a CVSS score of 7.1, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for sylius/sylius.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 1.10.0, < 1.10.11 1.10.11
    composer require sylius/sylius:1.10.11
  • >= 1.11.0, < 1.11.2 1.11.2
    composer require sylius/sylius:1.11.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback