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

  Latest News

New Safari XSS Flaw Leverages JavaScript Error Handling to Execute Arbitrary Code

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

New Safari XSS Flaw Leverages JavaScript Error Handling to Execute Arbitrary Code

Author: Guru Baran

A new cross-site scripting (XSS) vulnerability in Safari that exploits the browser’s TypeError exception handling mechanism to execute arbitrary JavaScript code. 

The flaw, discovered during Gareth Heyes research into payload concealment techniques, demonstrates how Safari’s improper handling of quote escaping in TypeError messages can be weaponized for malicious code execution. 

This vulnerability represents a significant security concern as it bypasses traditional XSS prevention mechanisms by leveraging the browser’s own error-handling infrastructure.

TypeError XSS Vulnerability
The vulnerability stems from Safari’s flawed handling of single and double quotes within TypeError exception messages. 

When developers attempt to use the new operator on a string literal containing mixed quotes, Safari generates a TypeError that inadequately escapes quote characters within the error message. 

The core issue manifests when executing code such as new ‘foo”bar’, which produces the TypeError message: “foo”bar” is not a constructor.

The critical flaw lies in Safari’s conversion process, where single quotes are transformed to double quotes, but the embedded double quote within the string remains unescaped.

This creates a scenario where the resulting error message contains three double quotes, effectively breaking the string boundary and allowing arbitrary JavaScript to be injected into the exception text. 

The exploitation becomes possible because TypeErrors, unlike syntax errors, do not prevent subsequent JavaScript execution, creating a pathway for malicious code to run within the context of the error message.

The exploitation technique combines the TypeError generation with JavaScript’s global error handler mechanism. 

A practical payload demonstration involves the code new ‘foo”-alert(1)//’, which generates the TypeError: “foo”-alert(1)//” is not a constructor.

cyber security news
When this error message is processed as JavaScript through the eval function, the TypeError: portion becomes a label statement, the first double quote closes the string, the alert(1) function executes, and the subsequent comment syntax (//) neutralizes the remaining error text. 

This technique can be further enhanced by utilizing window.name as a payload delivery mechanism, though Safari’s navigation-based clearing of window.name requires workarounds using target attributes or window.open() methods.

cyber security news
This vulnerability represents a sophisticated attack vector that bypasses conventional XSS filtering mechanisms by embedding malicious code within legitimate error-handling processes.

The exploit’s reliance on fundamental JavaScript error processing makes it particularly concerning, as it operates within the browser’s core functionality rather than exploiting application-level vulnerabilities. 

According to the report, the technique’s effectiveness is amplified by its ability to execute arbitrary code without requiring traditional script injection points.

The discovery highlights the importance of proper quote escaping in browser error messages and demonstrates how seemingly innocuous implementation details can create significant security vulnerabilities.

Organizations should implement comprehensive content security policies, validate all user inputs rigorously, and consider the potential for exploitation through error handling mechanisms. 

Browser vendors must prioritize the proper escaping of special characters in error messages to prevent similar vulnerabilities from emerging in future releases.



#Cyber_Security #Cyber_Security_News #JavaScript #Safari #Vulnerability #cyber_security #cyber_security_news #vulnerability

Оригинальная версия на сайте: New Safari XSS Flaw Leverages JavaScript Error Handling to Execute Arbitrary Code
Вернуться к списку новостей К свежим новостям Здесь был 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 ленту новостей вашего ресурса. Любая предложенная информация будет рассмотрена редакцией.