Stack Buffer Overflow in PHP Phar File Loading Could Lead to Memory Corruption or RCE
CVE-2023-3824

9.8CRITICAL

Key Information:

Vendor
PHP Group
Status
Vendor
CVE Published:
11 August 2023

Badges

πŸ₯‡ Trended No. 1πŸ“ˆ TrendedπŸ‘Ύ Exploit Exists🟑 Public PoC🟣 EPSS 16%πŸ“° News Worthy

What is CVE-2023-3824?

CVE-2023-3824 is a significant vulnerability affecting the PHP programming language, specifically versions 8.0.* prior to 8.0.30, 8.1.* prior to 8.1.22, and 8.2.* prior to 8.2.8. This vulnerability arises when the PHP interpreter processes PHAR (PHP Archive) files, where insufficient length checking can trigger a stack buffer overflow. Such an overflow can compromise memory integrity, potentially leading to arbitrary code execution (RCE). Organizations using affected PHP versions could face severe consequences if an attacker exploits this vulnerability, as it can facilitate unauthorized access to systems and sensitive data.

Technical Details

The vulnerability is rooted in the handling of PHAR directory entries during the loading of PHAR files. A lack of proper checks on the lengths of these entries could allow an attacker to overflow a buffer, which may corrupt memory. This technical flaw is particularly concerning in environments where PHP applications widely rely on PHAR archives for packaging and distribution of code. The affected PHP versions are prevalent in various web applications, making this vulnerability a notable risk across many installations.

Potential impact of CVE-2023-3824

  1. Remote Code Execution (RCE): The most critical impact of CVE-2023-3824 is the potential for attackers to execute arbitrary code remotely. This could lead to complete control of the affected systems, facilitating further malicious activities.

  2. Memory Corruption: The stack buffer overflow can lead to memory corruption, causing instability in applications using PHP and potentially compromising system integrity. This can result in application crashes or unintended behaviors that could be exploited further.

  3. Data Breaches: Given PHP's extensive use in web applications, an exploited vulnerability could expose sensitive information stored in databases or application configurations, leading to data breaches and loss of customer trust.

Affected Version(s)

PHP 8.0.*

PHP 8.0.* < 8.0.30

PHP 8.1.* < 8.1.22

Exploit Proof of Concept (PoC)

PoC code is written by security researchers to demonstrate the vulnerability can be exploited. PoC code is also a key component for weaponization which could lead to ransomware.

News Articles

Enhanced Security for Ubuntu Users: Key Updates Address Critical PHP Vulnerabilities

Explore the recent updates targeting critical vulnerabilities in PHP, enhancing digital security for Ubuntu users. Learn about CVE-2023-3823 and CVE-2023-3824, the impact of timely updates, and the broader implications for online security in today's interconnected world.

National Crime Agency smashes LockBit infrastructure, grabs 1,000 decryption keys

Did NCA, FBI deploy an exploit for PHP vulnerability CVE-2023-3824 to break the prolific group's systems?

Code exploiting two critical PHP(< 8.0.30) vulnerabilities published

Code exploiting two critical PHP(< 8.0.30) vulnerabilities published - Vulnerabilities - Information Security Newspaper | Hacking News

References

EPSS Score

16% chance of being exploited in the next 30 days.

CVSS V3.1

Score:
9.8
Severity:
CRITICAL
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
None
Scope:
Unchanged

Timeline

  • 🟑

    Public PoC available

  • πŸ‘Ύ

    Exploit known to exist

  • πŸ₯‡

    Vulnerability reached the number 1 worldwide trending spot

  • πŸ“ˆ

    Vulnerability started trending

  • Vulnerability published

  • πŸ“°

    First article discovered by Information Security Newspaper

  • Vulnerability Reserved

Credit

Niels Dossche
.
CVE-2023-3824 : Stack Buffer Overflow in PHP Phar File Loading Could Lead to Memory Corruption or RCE | SecurityVulnerability.io