Новости компьютерной безопасности:

  Latest News

Critical PHP’s extract() Function Vulnerability Allows Arbitrary Code Execution

С сайта: Vulnerability(cybersecuritynews.com)

Critical PHP’s extract() Function Vulnerability Allows Arbitrary Code Execution

Author: Guru Baran

A critical vulnerability in PHP’s extract() function enables attackers to trigger memory corruption that can lead to arbitrary native code execution across multiple PHP versions. 

The vulnerability stems from a memory management issue that can be triggered by a specific usage pattern involving references and object destructors affecting all major PHP versions including 5.x, 7.x, and 8.x.

Critical PHP’s extract() Function Vulnerability
The vulnerability exists within PHP’s extract() function, specifically when used with the EXTR_REFS flag. 

This function imports variables from an array into the current symbol table, which can be manipulated to create a dangerous memory condition.

cyber security news
When extract() processes a variable that’s an object with a defined __destruct() method, attackers can trigger a race condition. 

The __destruct() method can unset the variable that extract() is currently operating on, leading to:

  • A double-free condition in PHP 5.x versions.
  • A use-after-free vulnerability in PHP 7.x and 8.x versions.

Security researchers demonstrated that this memory corruption can be reliably exploited to gain arbitrary code execution by overlapping a string and array zval, effectively giving attackers read/write access to PHP’s memory.

The attack follows a sophisticated pattern:

  • Triggering the double-free/use-after-free with a crafted object.
  • Manipulating PHP’s memory allocation to create overlapping memory structures.
  • Leaking memory addresses of critical PHP internals like executor_globals.
  • Locating disabled functions like system() in memory.
  • Restoring functionality of disabled functions by overwriting internal structures.

Address Space Layout Randomization (ASLR) does not prevent this attack, as exploits can leak memory addresses at runtime by manipulating overlapped data structures.

The flaw has been identified by independent security researcher LCFR in collaboration with SSD Secure Disclosure.

Proof of Concept Code
A minimal proof of concept triggering the vulnerability:

cyber security news
When debugging with ASAN (AddressSanitizer), this code produces a heap-use-after-free error in PHP 8.x, confirming the vulnerability.

The PHP development team has addressed the issue through GitHub security advisory GHSA-4pwq-3fv3-gm94.

Web application administrators and PHP developers should:

  • Update to the latest patched PHP version immediately.
  • Avoid using extract() with user-controlled data.
  • If extract() must be used, avoid the EXTR_REFS flag.
  • Consider implementing additional application-level security controls.

This vulnerability underscores the risks associated with PHP’s dynamic features and memory management. 

Developers are urged to audit their use of extract(), apply security patches promptly, and adhere to secure coding practices to prevent exploitation of such critical flaws.



#Cyber_Security #Cyber_Security_News #Php #Vulnerability #cyber_security #cyber_security_news

Оригинальная версия на сайте: Critical PHP’s extract() Function Vulnerability Allows Arbitrary Code Execution
Вернуться к списку новостей К свежим новостям Здесь был google AdSense.
Вместо рекламы товаров началась политическая агитация.
Отключено до получения извинений.

Вернуться к списку новостей Здесь был google AdSense.
Вместо рекламы товаров началась политическая агитация.
Отключено до получения извинений.


Новости проекта CSN:

✉ CSN.net4me.net

Обновление сайта csn.net4me.net

Обновление сайта csn.net4me.net 💻
cyber security news
  • Физически мы переехали на новый сервер. Благодарим наших подписчиков и постоянных читателей за терпение и понимание.
  • Сайт csn.net4me.net полностью адаптирован для работы по шифрованному SSL соединению.
  • Изменен механизм обработки и отображения опасных и критических уязвимостей.

Благодарим что вы с нами.


#CSN_обновление_сайта
https://csn.net4me.net/cyber_security_8301.html

Дополнительный материал

О проекте CSN

Проект CSN.net4me.net родился 16 Марта 2018 года.
Проект находится в самом начале своего развития. Конечно оформление, наполнение будет меняться. Одно останется неизменным - самые свежие новости компьютерной и сетевой безопасности.

О проекте net4me

Проект net4me.net развивался как сборник готовых решений и документации по темам компьютерной безопасности, сетевых решений и СПО (в часности linux). Темпы развития IT отрасли оказались столь быстрыми, что некоторые знания, технологии и информация о них устаревали мгновенно. Тем не менее, некоторый материал net4me.net до сих пор востребован.

Об источниках

Новости берутся CSN из открытых и доступных каждому источников. Авторы проекта стараются подбирать авторитетные и проверенные источники. Но, тем не менее, не несут ответственности за содержимое новостей. В каждой новости указывается источник этой новости, её автор и ссылка на оригинал новости.

Информация

Если вы желаете чтобы новости вашего ресурса были размещены на сайте CSN, то свяжитесь с авторами проекта csn@net4me.net и предложите ссылку на rss или xml ленту новостей вашего ресурса. Любая предложенная информация будет рассмотрена редакцией.