GHSA-6w27-c66f-gvhq CVE-2025-24430
Magento Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability
- Severity
- 3.7 / 10
- Low · CVSS 3.1
- Exploit chance (EPSS)
- 0.40%
- Chance of exploitation in the next 30 days. Higher than 34.21% 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-p4- Upgrade magento/community-edition to this version or later
Description
Adobe Commerce versions 2.4.7-beta1, 2.4.7-p3, 2.4.6-p8, 2.4.5-p10, 2.4.4-p11 and earlier are affected by a Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability that could result in a security feature bypass. An attacker could exploit this race condition to alter a condition after it has been checked but before it is used, potentially bypassing security mechanisms. Exploitation of this issue requires user interaction.
Affected versions
Packagist
| Package | Vulnerable | Fixed in |
|---|---|---|
| magento/community-edition | >= 2.4.7-beta1, < 2.4.7-p4 |
2.4.7-p4 |
| magento/community-edition | >= 2.4.6-p1, < 2.4.6-p9 |
2.4.6-p9 |
| magento/community-edition | >= 2.4.5-p1, < 2.4.5-p11 |
2.4.5-p11 |
| magento/community-edition | < 2.4.4-p12 |
2.4.4-p12 |
| 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 |
| magento/community-edition | 1 listed versions | No fix yet |
| magento/project-community-edition | <= 2.0.2 |
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-p4
- composer
composer require magento/community-edition:^2.4.7-p4
Severity breakdown
CVSS 3.1 3.7
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- 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
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why 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 |
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