ruby: Arbitrary heap exposure during a JSON.generate call
Published Aug 31, 2017
9.8
CRITICALCVSS 3.0
EPSS 9.45%
Description
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.
Affected products
No data.
Configuration 1
- ≤ 2.2.7
- 2.3.0
- 2.3.0
- 2.3.0
- 2.3.1
- 2.3.2
- 2.3.3
- 2.3.4
- 2.4.0
- 2.4.0
- 2.4.0
- 2.4.0
- 2.4.0
- 2.4.1
Configuration 2
- 8.0
- 9.0
Configuration 3
- 14.04
- 16.04
- 17.10
Configuration 4
- 7.0
- 7.0
- 7.4
- 7.6
- 7.4
- 7.5
- 7.6
- 7.4
- 7.6
- 7.0
No data.
Red Hat Enterprise Linux 7
ruby-0:2.0.0.648-33.el7_4
Fixed · RHSA-2018:0378
Red Hat Hardened Images
ruby3-3-main-3.3.10-23.1.hum1
Fixed · RHSA-2026:7305
Red Hat Hardened Images
ruby3-4-main-3.4.8-31.1.hum1
Fixed · RHSA-2026:7307
Red Hat Hardened Images
ruby4-0-main-4.0.0-33.3.hum1
Fixed · RHSA-2026:8838
Red Hat Software Collections for Red Hat Enterprise Linux 6
rh-ruby22-ruby-0:2.2.9-19.el6
Fixed · RHSA-2018:0583
Red Hat Software Collections for Red Hat Enterprise Linux 6
rh-ruby23-ruby-0:2.3.6-67.el6
Fixed · RHSA-2018:0585
Red Hat Software Collections for Red Hat Enterprise Linux 6
rh-ruby24-ruby-0:2.4.2-86.el6
Fixed · RHSA-2017:3485
Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
rh-ruby22-ruby-0:2.2.9-19.el6
Fixed · RHSA-2018:0583
Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
rh-ruby23-ruby-0:2.3.6-67.el6
Fixed · RHSA-2018:0585
Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
rh-ruby24-ruby-0:2.4.2-86.el6
Fixed · RHSA-2017:3485
Red Hat Software Collections for Red Hat Enterprise Linux 7
rh-ruby22-ruby-0:2.2.9-19.el7
Fixed · RHSA-2018:0583
Red Hat Software Collections for Red Hat Enterprise Linux 7
rh-ruby23-ruby-0:2.3.6-67.el7
Fixed · RHSA-2018:0585
Red Hat Software Collections for Red Hat Enterprise Linux 7
rh-ruby24-ruby-0:2.4.2-86.el7
Fixed · RHSA-2017:3485
Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS
rh-ruby22-ruby-0:2.2.9-19.el7
Fixed · RHSA-2018:0583
Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS
rh-ruby23-ruby-0:2.3.6-67.el7
Fixed · RHSA-2018:0585
Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS
rh-ruby24-ruby-0:2.4.2-86.el7
Fixed · RHSA-2017:3485
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
rh-ruby22-ruby-0:2.2.9-19.el7
Fixed · RHSA-2018:0583
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
rh-ruby23-ruby-0:2.3.6-67.el7
Fixed · RHSA-2018:0585
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS
rh-ruby24-ruby-0:2.4.2-86.el7
Fixed · RHSA-2017:3485
CloudForms Management Engine 5
rh-ruby22-ruby
Affected
CloudForms Management Engine 5
ruby-200-ruby
Affected
Red Hat Enterprise Linux 5
ruby
Not affected
Red Hat Enterprise Linux 6
ruby
Not affected
Red Hat Subscription Asset Manager
ruby193-ruby
Under investigation
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 7 | ruby-0:2.0.0.648-33.el7_4 | Fixed | RHSA-2018:0378 |
| Red Hat Hardened Images | ruby3-3-main-3.3.10-23.1.hum1 | Fixed | RHSA-2026:7305 |
| Red Hat Hardened Images | ruby3-4-main-3.4.8-31.1.hum1 | Fixed | RHSA-2026:7307 |
| Red Hat Hardened Images | ruby4-0-main-4.0.0-33.3.hum1 | Fixed | RHSA-2026:8838 |
| Red Hat Software Collections for Red Hat Enterprise Linux 6 | rh-ruby22-ruby-0:2.2.9-19.el6 | Fixed | RHSA-2018:0583 |
| Red Hat Software Collections for Red Hat Enterprise Linux 6 | rh-ruby23-ruby-0:2.3.6-67.el6 | Fixed | RHSA-2018:0585 |
| Red Hat Software Collections for Red Hat Enterprise Linux 6 | rh-ruby24-ruby-0:2.4.2-86.el6 | Fixed | RHSA-2017:3485 |
| Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS | rh-ruby22-ruby-0:2.2.9-19.el6 | Fixed | RHSA-2018:0583 |
| Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS | rh-ruby23-ruby-0:2.3.6-67.el6 | Fixed | RHSA-2018:0585 |
| Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS | rh-ruby24-ruby-0:2.4.2-86.el6 | Fixed | RHSA-2017:3485 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7 | rh-ruby22-ruby-0:2.2.9-19.el7 | Fixed | RHSA-2018:0583 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7 | rh-ruby23-ruby-0:2.3.6-67.el7 | Fixed | RHSA-2018:0585 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7 | rh-ruby24-ruby-0:2.4.2-86.el7 | Fixed | RHSA-2017:3485 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS | rh-ruby22-ruby-0:2.2.9-19.el7 | Fixed | RHSA-2018:0583 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS | rh-ruby23-ruby-0:2.3.6-67.el7 | Fixed | RHSA-2018:0585 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS | rh-ruby24-ruby-0:2.4.2-86.el7 | Fixed | RHSA-2017:3485 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS | rh-ruby22-ruby-0:2.2.9-19.el7 | Fixed | RHSA-2018:0583 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS | rh-ruby23-ruby-0:2.3.6-67.el7 | Fixed | RHSA-2018:0585 |
| Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS | rh-ruby24-ruby-0:2.4.2-86.el7 | Fixed | RHSA-2017:3485 |
| CloudForms Management Engine 5 | rh-ruby22-ruby | Affected | n/a |
| CloudForms Management Engine 5 | ruby-200-ruby | Affected | n/a |
| Red Hat Enterprise Linux 5 | ruby | Not affected | n/a |
| Red Hat Enterprise Linux 6 | ruby | Not affected | n/a |
| Red Hat Subscription Asset Manager | ruby193-ruby | Under investigation | n/a |
No package ranges for this CVE.
Remediation
Red Hat statement
This issue did not affect the versions of ruby as shipped with Red Hat Enterprise Linux 5, and 6. These versions do not include the JSON module. This issue affects the versions of ruby as shipped with Red Hat Enterprise Linux 7, as well as the versions of rh-ruby22-ruby and rh-ruby23-ruby as shipped with Red Hat Software Collections. Red Hat Product Security has rated this issue as having Low security impact. A future update may address this issue. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.
Metrics
No CVSS v4.0 score for this CVE.
No CVSS v3.1 score for this CVE.
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
1 other source (Red Hat) ▾
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
AV:N/AC:L/Au:N/C:P/I:P/A:P
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
2021–2026- EPSS v1
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v1
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (26 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 9.45% (0.09445) | 95.28th | v5 (v2026.06.15) |
| Jun 15, 2026 | 9.45% (0.09445) | 94.77th | v5 (v2026.06.15) |
| Jan 4, 2026 | 1.48% (0.01477) | 80.53th | v4 (v2025.03.14) |
| Jan 1, 2026 | 2.67% (0.02667) | 85.43th | v4 (v2025.03.14) |
| Dec 4, 2025 | 1.52% (0.01518) | 80.67th | v4 (v2025.03.14) |
| Dec 1, 2025 | 2.74% (0.02739) | 85.54th | v4 (v2025.03.14) |
| May 30, 2025 | 1.71% (0.01708) | 81.40th | v4 (v2025.03.14) |
| Apr 13, 2025 | 3.24% (0.03240) | 86.02th | v4 (v2025.03.14) |
| Mar 30, 2025 | 1.71% (0.01708) | 80.64th | v4 (v2025.03.14) |
| Mar 29, 2025 | 7.44% (0.07441) | 85.96th | v4 (v2025.03.14) |
| Mar 17, 2025 | 1.71% (0.01708) | 81.09th | v4 (v2025.03.14) |
| Dec 17, 2024 | 2.02% (0.02021) | 88.59th | v3 (v2023.03.01) |
| Mar 14, 2024 | 0.60% (0.00601) | 77.98th | v3 (v2023.03.01) |
| Dec 5, 2023 | 0.60% (0.00601) | 75.97th | v3 (v2023.03.01) |
| Sep 16, 2023 | 0.59% (0.00593) | 75.75th | v3 (v2023.03.01) |
| Jul 8, 2023 | 0.84% (0.00839) | 79.80th | v3 (v2023.03.01) |
| May 8, 2023 | 0.80% (0.00801) | 79.12th | v3 (v2023.03.01) |
| Apr 20, 2023 | 0.84% (0.00839) | 79.67th | v3 (v2023.03.01) |
| Mar 7, 2023 | 1.15% (0.01149) | 82.58th | v3 (v2023.03.01) |
| Mar 6, 2023 | 2.69% (0.02686) | 82.85th | v2 (v2022.01.01) |
| Apr 1, 2022 | 2.69% (0.02686) | 81.17th | v2 (v2022.01.01) |
| Feb 4, 2022 | 2.69% (0.02686) | 62.66th | v2 (v2022.01.01) |
| Feb 3, 2022 | 3.48% (0.03480) | 68.33th | v1 |
| Jan 6, 2022 | 3.48% (0.03480) | 68.04th | v1 |
| Sep 1, 2021 | 3.48% (0.03480) | 82.00th | v1 |
| Apr 14, 2021 | 3.48% (0.03480) | 0.00th | v1 |
References (21)
- http://www.securityfocus.com/bid/100890 vdb-entryx_refsource_BIDThird Party AdvisoryVDB Entry
- http://www.securitytracker.com/id/1039363 vdb-entryx_refsource_SECTRACKThird Party AdvisoryVDB Entry
- http://www.securitytracker.com/id/1042004 vdb-entryx_refsource_SECTRACKThird Party AdvisoryVDB Entry
- https://access.redhat.com/errata/RHSA-2017:3485 vendor-advisoryx_refsource_REDHATThird Party Advisory
- https://access.redhat.com/errata/RHSA-2018:0378 vendor-advisoryx_refsource_REDHATThird Party Advisory
- https://access.redhat.com/errata/RHSA-2018:0583 vendor-advisoryx_refsource_REDHATThird Party Advisory
- https://access.redhat.com/errata/RHSA-2018:0585 vendor-advisoryx_refsource_REDHATThird Party Advisory
- https://access.redhat.com/security/cve/CVE-2017-14064 Vendor Advisory
- https://bugs.ruby-lang.org/issues/13853 x_refsource_MISCIssue TrackingPatchVendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=1487552 Issue Tracking
- https://github.com/flori/json/commit/8f782fd8e181d9cfe9387ded43a5ca9692266b85 x_refsource_MISCIssue TrackingPatchThird Party Advisory
- https://hackerone.com/reports/209949 x_refsource_MISCExploitThird Party Advisory
- https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html mailing-listx_refsource_MLISTMailing ListThird Party Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2017-14064
- https://security.gentoo.org/glsa/201710-18 vendor-advisoryx_refsource_GENTOOThird Party Advisory
- https://usn.ubuntu.com/3685-1/ vendor-advisoryx_refsource_UBUNTUThird Party Advisory
- https://www.cve.org/CVERecord?id=CVE-2017-14064
- https://www.debian.org/security/2017/dsa-3966 vendor-advisoryx_refsource_DEBIANThird Party Advisory
- https://www.ruby-lang.org/en/news/2017/09/14/json-heap-exposure-cve-2017-14064/
- https://www.ruby-lang.org/en/news/2017/09/14/ruby-2-2-8-released/ x_refsource_CONFIRMVendor Advisory
- https://www.ruby-lang.org/en/news/2017/09/14/ruby-2-3-5-released/ x_refsource_CONFIRMVendor Advisory
Change history (0)
No recorded changes yet.