Skip to content

GHSA-47jp-46c9-25vf CVE-2024-45120

Magento Open Source Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability

Low Packagist
Severity
0.0 / 10
Low · CVSS 4.0
Exploit chance (EPSS)
0.40%
Chance of exploitation in the next 30 days. Higher than 34.80% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition
Fix
2.4.7-p3
Upgrade magento/community-edition to this version or later

Description

Adobe Commerce versions 2.4.7-p2, 2.4.6-p7, 2.4.5-p9, 2.4.4-p10 and earlier are affected by a Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability that could lead to a security feature bypass. An attacker could exploit this vulnerability to alter a condition between the check and the use of a resource, having a low impact on integrity. Exploitation of this issue requires user interaction.

Affected versions

Packagist

PackageVulnerableFixed in
magento/community-edition
>= 2.4.7-beta1, < 2.4.7-p3
2.4.7-p3
magento/community-edition
>= 2.4.6-p1, < 2.4.6-p8
2.4.6-p8
magento/community-edition
>= 2.4.5-p1, < 2.4.5-p10
2.4.5-p10
magento/community-edition
< 2.4.4-p11
2.4.4-p11
magento/community-edition 1 listed versions No fix yet
magento/community-edition 1 listed versions No fix yet
magento/community-edition 1 listed versions No fix yet
magento/community-edition 1 listed versions No fix yet

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

magento/community-edition Packagist → 2.4.7-p3

composer
composer require magento/community-edition:^2.4.7-p3

Severity breakdown

CVSS 4.0 0.0

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N

Attack vector
Network
Attack complexity
Low
Attack requirements
None
Privileges required
None
User interaction
Passive
Confidentiality (vulnerable system)
None
Integrity (vulnerable system)
None
Availability (vulnerable system)
None
Confidentiality (subsequent systems)
None
Integrity (subsequent systems)
Low
Availability (subsequent systems)
None

CVSS 3.1 4.3

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N

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

Weakness

CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition

The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.

How to prevent it
  • Implementation: The most basic advice for TOCTOU vulnerabilities is to not perform a check before the use. This does not resolve the underlying issue of the execution of a function on a resource whose state and identity cannot be assured, but it does help to limit the false sense of security given by the check.
  • Implementation: When the file being altered is owned by the current user and group, set the effective gid and uid to that of the current user and group when executing this statement.
  • Architecture and Design: Limit the interleaving of operations on files from multiple processes.
  • Implementation, Architecture and Design: If you cannot perform operations atomically and you must share access to the resource between multiple processes or threads, then try to limit the amount of time (CPU cycles) between the check and use of the resource. This will not fix the problem, but it could make it more difficult for an attack to succeed.
  • Implementation: Recheck the resource after the use call to verify that the action was taken appropriately.
  • Architecture and Design: Ensure that some environmental locking mechanism can be used to protect resources effectively.
  • Implementation: Ensure that locking occurs before the check, as opposed to afterwards, such that the resource, as checked, is the same as it is when in use.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-wh92-6q6g-px7j
Magento Community Edition Improper Input Validation vulnerability
Critical Known exploited Also affects magento/community-edition
GHSA-m8cj-3v68-3cxj
Magento Open Source affected by an Improper Restriction of XML External Entity Reference ('XXE') vulnerability
Critical Known exploited Also affects magento/community-edition
GHSA-f8fv-f786-9933
Magento improper input validation vulnerability
Critical Known exploited Also affects magento/community-edition
GHSA-qvwr-p3hj-j6jf
Magento vulnerable to privilege escalation due to incorrect authorization
Medium Also affects magento/community-edition
GHSA-pcrx-r49h-x2w5
Magento vulnerable to stored Cross-Site Scripting (XSS)
Medium Also affects magento/community-edition
GHSA-r355-75hw-r8jf
Magento allows incorrect authorization
Medium Also affects magento/community-edition
GHSA-2768-5wmv-cfff
Magento vulnerable to stored Cross-Site Scripting (XSS)
High Also affects magento/community-edition
GHSA-69x9-xp2j-w8g8
Magento provides incorrect authorization through a security feature bypass
High Also affects magento/community-edition
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor