Skip to content
Memory corruption Advisory Advanced CVE-2022-43591

Qt Project Qt QML QtScript Javascript spreading buffer overflow vulnerability

A heap-based buffer overflow exists in Qt's QML QtScript engine when spreading a large array into a function call. An attacker could exploit this to cause memory corruption and potentially achieve arbitrary code execution.

Aleksandar Nikolic Follow

Originally disclosed on Cisco Talos

High 8.8 View original

A buffer overflow vulnerability exists in the QML QtScript Reflect API of Qt Project Qt 6.3.2. A specially-crafted javascript code can trigger an out-of-bounds memory access, which can lead to arbitrary code execution.

Aleksandar Nikolic, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The spread argument handling allocates stack space for each element without checking available space, leading to a heap buffer overflow.

Impact

This could lead to arbitrary code execution, but the target application would need to access a malicious web page to trigger the vulnerability.

What the attacker needed

Victim visits malicious web page

How it was found

  1. Create an array and set its length to a large value.
  2. Use the spread operator to pass the array as arguments to a function call.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This is a memory corruption bug in a JavaScript engine used by Qt applications. When a large array is spread into a function call, the engine writes past the end of a buffer, which can crash the program or let an attacker run their own code.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Aleksandar Nikolic

View all

147 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.