Exploit database

Vulnerability

CVE-2024-34102

XXE can expose crypt key and other secrets granting full admin access

Vulnerability details

Score
9.8
Severity
critical

CVSS 3.1 · adobe

Vector string

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

Description

Adobe Commerce versions 2.4.7, 2.4.6-p5, 2.4.5-p7, 2.4.4-p8 and earlier are affected by an Improper Restriction of XML External Entity Reference ('XXE') vulnerability that could result in arbitrary code execution. An attacker could exploit this vulnerability by sending a crafted XML document that references external entities. Exploitation of this issue does not require user interaction.

CVE Program

Exploit source choices

15 sources
CosmicSting: Magento Arbitrary File Read (CVE-2024-34102) + PHP Buffer Overflow in the iconv() function of glibc (CVE-2024-2961)
MSF-linux--http--magento_xxe_to_glibc_buf_overflowMetasploitLinux,Unix / remotePreferred

This combination of an Arbitrary File Read (CVE-2024-34102) and a Buffer Overflow in glibc (CVE-2024-2961) allows for unauthenticated Remote Code Execution on the following versions of Magento and Adobe Commerce and earlier if the PHP and glibc versions are also vulnerable: - 2.4.7 and earlier - 2.4.6-p5 and earlier - 2.4.5-p7 and earlier - 2.4.4-p8 and earlier Vulnerable PHP versions: - From PHP 7.0.0 (2015) to 8.3.7 (2024) Vulnerable iconv() function in the GNU C Library: - 2.39 and earlier The exploit chain is quite interesting and for more detailed information check out the references. The tl;dr being: CVE-2024-34102 is an XML External Entity vulnerability leveraging PHP filters to read arbitrary files from the target system. The exploit chain uses this to read /proc/self/maps, providing the address of PHP's heap and the libc's filename. The libc is then downloaded, and the offsets of libc_malloc, libc_system and libc_realloc are extracted, and made use of later in the chain. With this information and expert knowledge of PHP's heap (chunks, free lists, buckets, bucket brigades), CVE-2024-2961 can be exploited. A long chain of PHP filters is constructed and sent in the same way the XXE is exploited, building a payload in memory and using the buffer overflow to execute it, resulting in an unauthenticated RCE.

2024-07-26magento_xxe_to_glibc_buf_overflow.rb
chocapikk/cve-2024-34102
GH-518ad7c8d42fc2d55c187bebc5e6fd7eGitHubUnofficial GitHub source

CosmicSting (CVE-2024-34102)

2024-06-283 files · 48 stars
bigb0x/cve-2024-34102
GH-c536bacda4788e9e01458c99d18a8f3eGitHubUnofficial GitHub source

POC for CVE-2024-34102. A pre-authentication XML entity injection issue in Magento / Adobe Commerce.

2024-06-273 files · 31 stars
th3gokul/cve-2024-50603
GH-ad56bddf291c2d16cd2af85c3d28f1ccGitHubUnofficial GitHub source

CVE-2024-50603: Aviatrix Controller Unauthenticated Command Injection

2025-01-122 files · 15 stars
th3gokul/cve-2024-34102
GH-80bcda4cc759a563958f05f3a66ec9aeGitHubUnofficial GitHub source

CVE-2024-34102: Unauthenticated Magento XXE

2024-06-273 files · 14 stars
bughuntar/cve-2024-34102
GH-025c552c746389c13c30423d95410bd8GitHubUnofficial GitHub source

Exploitation CVE-2024-34102

2024-07-132 files · 5 stars
eqstlab/cve-2024-34102
GH-e39feea18ecaff103ddd454eb06079ccGitHubUnofficial GitHub source

Adobe Commerce XXE exploit

2024-08-133 files · 5 stars
0x0d3ad/cve-2024-34102
GH-de8a66b20ab2433b09c3132371bd0118GitHubUnofficial GitHub source

CVE-2024-34102 (Magento XXE)

2024-06-304 files · 2 stars
nmmorette/cve-2024-34102
GH-075eaa8fc50d2ccaf5fe0b31e3f86812GitHubUnofficial GitHub source

CVE-2024-34102 exploit for python3

2026-02-137 files · 1 stars
revoltsecurities/cve-2024-36401
GH-46cc8e40a9ff045d9dc368a1dbbd3dc4GitHubUnofficial GitHub source

Exploiter a Vulnerability detection and Exploitation tool for GeoServer Unauthenticated Remote Code Execution CVE-2024-36401.

2024-07-054 files · 1 stars
wubinworks/magento2-cosmic-sting-patch
GH-97e08b80a059bbe817ea1764e529b3b1GitHubUnofficial GitHub source

An alternative solution(as a Magento 2 extension) to fix the XXE vulnerability CVE-2024-34102(aka Cosmic Sting). If you cannot upgrade Magento or cannot apply the official patch, try this one.

2024-08-0810 files · 1 stars
bigcartenergy/module-cosmicsting-patch
GH-a4ae5323ab9c69e18ecf645fdf93f237GitHubUnofficial GitHub source

Free security patch for Magento Open Source and Mage-OS by Big Cart Energy: closes CVE-2024-34102 (CosmicSting) on the Magento 2.3 and 2.4 releases that have no official fix, as one plugin on the Web API input processor that applies the rule of Adobe's fix. No core file is modified.

2026-11-0718 files · 0 stars
d0rb/cve-2024-34102
GH-345bcbcf4a6d84aecbb0981d8e673723GitHubUnofficial GitHub source

A PoC demonstration , critical XML entity injection vulnerability in Magento

2024-06-282 files · 0 stars