Out-of-Bounds Affecting ruby package, versions <2.4.2-r0


0.0
critical

Snyk CVSS

    Attack Complexity Low
    Confidentiality High
    Integrity High
    Availability High

    Threat Intelligence

    EPSS 0.6% (79th percentile)
Expand this section
NVD
9.8 critical
Expand this section
Red Hat
5.9 medium

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 ID SNYK-ALPINE39-RUBY-339285
  • published 31 Aug 2017
  • disclosed 31 Aug 2017

How to fix?

Upgrade Alpine:3.9 ruby to version 2.4.2-r0 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream ruby package and not the ruby package as distributed by Alpine. See How to fix? for Alpine:3.9 relevant fixed versions and status.

Ruby through 2.2.7, 2.3.x through 2.3.4, and 2.4.x through 2.4.1 can expose arbitrary memory during a JSON.generate call. The issues lies in using strdup in ext/json/ext/generator/generator.c, which will stop after encountering a '\0' byte, returning a pointer to a string of length zero, which is not the length stored in space_len.