CVE-2026-9499: Out-of-bounds read in QTextCodec::codecForName() in Qt
An out-of-bounds read (buffer over-read) vulnerability exists in QTextCodec::codecForName() in Qt. When the function is called with a QByteArray that is not NUL-terminated (for example, one created with QByteArray::fromRawData()), the codec-name matching routine reads past the end of the supplied buffer. In most cases this results in an incorrect text codec being selected; in the worst case, if the over-read reaches unmapped memory, the process crashes (denial of service). The over-read is bounded by the length of the longest codec-name candidate, and the out-of-bounds bytes are only compared internally against Qt's fixed list of codec names, so no data is disclosed to an attacker. Applications that do not pass non-NUL-terminated QByteArrays to QTextCodec::codecForName() are not exposed. The affected code resides in the Qt5Compat module from Qt 6.0.0 onward, and in Qt Core (qtbase) in Qt 4.x and Qt 5.x.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Qt (QTextCodec::codecForName)to a version that resolves this vulnerability.Fixed in 6.8.8 - Upgrade
Upgrade
Qt (QTextCodec::codecForName)to a version that resolves this vulnerability.Fixed in 6.11.1 - Upgrade
Upgrade
Qt (QTextCodec::codecForName)to a version that resolves this vulnerability.Fixed in 6.12.0 - Compensating control
Ensure applications do not call QTextCodec::codecForName() with QByteArrays that are not NUL-terminated (e.g., avoid QByteArray::fromRawData() inputs), since this triggers the bounded out-of-bounds read and can cause a crash (DoS).
Event History
Frequently Asked Questions
What is the severity of CVE-2026-9499?
The severity of CVE-2026-9499 is classified as medium with a CVSS score of 6.3.
What is the nature of the vulnerability in CVE-2026-9499?
CVE-2026-9499 describes an out-of-bounds read vulnerability in QTextCodec::codecForName() in Qt.
How does CVE-2026-9499 affect applications using Qt?
Applications using Qt and calling QTextCodec::codecForName() with a non-NUL-terminated QByteArray may experience buffer over-reads.
Is there a workaround for CVE-2026-9499?
To mitigate CVE-2026-9499, ensure that any QByteArray passed to QTextCodec::codecForName() is properly NUL-terminated.
What versions of Qt are impacted by CVE-2026-9499?
CVE-2026-9499 affects Qt 6 and the Qt5Compat module.