Integer Overflow or Wraparound Affecting michaelrsweet/htmldoc package, versions [,1.9.16)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.15% (36th 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-MICHAELRSWEETHTMLDOC-2812820
  • published10 May 2022
  • disclosed10 May 2022
  • creditUnknown

Introduced: 10 May 2022

CVE-2022-27114  (opens in a new tab)
CWE-190  (opens in a new tab)

How to fix?

Upgrade michaelrsweet/htmldoc to version 1.9.16 or higher.

Overview

Affected versions of this package are vulnerable to Integer Overflow or Wraparound in image_load_jpeg when it calls malloc,img->width and img->height which are larger enough. The malloc function may return a heap block smaller than the expected size, and it will cause a buffer overflow or Address boundary error in the jpeg_read_scanlines function.

CVSS Base Scores

version 3.1