ruby: off-by-one stack-based buffer overflow in the encodes() function
Published Nov 15, 2014
5.0
MEDIUMCVSS 2.0
EPSS 3.48%
Description
Off-by-one error in the encodes function in pack.c in Ruby 1.9.3 and earlier, and 2.x through 2.1.2, when using certain format string specifiers, allows context-dependent attackers to cause a denial of service (segmentation fault) via vectors that trigger a stack-based buffer overflow.
Affected products
No data.
Configuration 1
- ≤ 1.9.3
- 2.0
- 2.0.0
- 2.0.0
- 2.0.0
- 2.0.0
- 2.0.0
- 2.0.0
- 2.0.0
- 2.0.0
- 2.1
- 2.1
- 2.1.1
- 2.1.2
Configuration 2
- 7.0
- 7.0
- 7.0
- 7.0
Configuration 3
- 7.0
- 8.0
Configuration 4
- 12.04
- 14.04
- 14.10
No data.
Red Hat Enterprise Linux 7
ruby-0:2.0.0.353-22.el7_0
Fixed · RHSA-2014:1912
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 1 for Red Hat Enterprise Linux 6
ruby193-ruby-0:1.9.3.484-50.el6
Fixed · RHSA-2014:1913
Red Hat Software Collections 1 for Red Hat Enterprise Linux 6
ruby200-ruby-0:2.0.0.353-24.el6
Fixed · RHSA-2014:1914
Red Hat Software Collections 1 for Red Hat Enterprise Linux 6.4 EUS
ruby193-ruby-0:1.9.3.484-50.el6
Fixed · RHSA-2014:1913
Red Hat Software Collections 1 for Red Hat Enterprise Linux 6.4 EUS
ruby200-ruby-0:2.0.0.353-24.el6
Fixed · RHSA-2014:1914
Red Hat Software Collections 1 for Red Hat Enterprise Linux 6.5 EUS
ruby193-ruby-0:1.9.3.484-50.el6
Fixed · RHSA-2014:1913
Red Hat Software Collections 1 for Red Hat Enterprise Linux 6.5 EUS
ruby200-ruby-0:2.0.0.353-24.el6
Fixed · RHSA-2014:1914
Red Hat Software Collections 1 for Red Hat Enterprise Linux 6.6 EUS
ruby193-ruby-0:1.9.3.484-50.el6
Fixed · RHSA-2014:1913
Red Hat Software Collections 1 for Red Hat Enterprise Linux 6.6 EUS
ruby200-ruby-0:2.0.0.353-24.el6
Fixed · RHSA-2014:1914
Red Hat Software Collections 1 for Red Hat Enterprise Linux 7
ruby193-ruby-0:1.9.3.484-50.el7
Fixed · RHSA-2014:1913
Red Hat Software Collections 1 for Red Hat Enterprise Linux 7
ruby200-ruby-0:2.0.0.353-24.el7
Fixed · RHSA-2014:1914
CloudForms Management Engine 5
mingw-ruby
Will not fix
CloudForms Management Engine 5
ruby193-ruby
Will not fix
OpenShift Enterprise 1
ruby193-ruby
Will not fix
Red Hat Enterprise Linux 5
ruby
Not affected
Red Hat Enterprise Linux 6
ruby
Not affected
Red Hat Hardened Images
ruby
Affected
Red Hat OpenStack Platform 3
ruby193-ruby
Will not fix
Red Hat OpenStack Platform 4
ruby193-ruby
Will not fix
Red Hat Satellite 6
rubygem-rake
Not affected
Red Hat Subscription Asset Manager
ruby193-ruby
Will not fix
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 7 | ruby-0:2.0.0.353-22.el7_0 | Fixed | RHSA-2014:1912 |
| 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 1 for Red Hat Enterprise Linux 6 | ruby193-ruby-0:1.9.3.484-50.el6 | Fixed | RHSA-2014:1913 |
| Red Hat Software Collections 1 for Red Hat Enterprise Linux 6 | ruby200-ruby-0:2.0.0.353-24.el6 | Fixed | RHSA-2014:1914 |
| Red Hat Software Collections 1 for Red Hat Enterprise Linux 6.4 EUS | ruby193-ruby-0:1.9.3.484-50.el6 | Fixed | RHSA-2014:1913 |
| Red Hat Software Collections 1 for Red Hat Enterprise Linux 6.4 EUS | ruby200-ruby-0:2.0.0.353-24.el6 | Fixed | RHSA-2014:1914 |
| Red Hat Software Collections 1 for Red Hat Enterprise Linux 6.5 EUS | ruby193-ruby-0:1.9.3.484-50.el6 | Fixed | RHSA-2014:1913 |
| Red Hat Software Collections 1 for Red Hat Enterprise Linux 6.5 EUS | ruby200-ruby-0:2.0.0.353-24.el6 | Fixed | RHSA-2014:1914 |
| Red Hat Software Collections 1 for Red Hat Enterprise Linux 6.6 EUS | ruby193-ruby-0:1.9.3.484-50.el6 | Fixed | RHSA-2014:1913 |
| Red Hat Software Collections 1 for Red Hat Enterprise Linux 6.6 EUS | ruby200-ruby-0:2.0.0.353-24.el6 | Fixed | RHSA-2014:1914 |
| Red Hat Software Collections 1 for Red Hat Enterprise Linux 7 | ruby193-ruby-0:1.9.3.484-50.el7 | Fixed | RHSA-2014:1913 |
| Red Hat Software Collections 1 for Red Hat Enterprise Linux 7 | ruby200-ruby-0:2.0.0.353-24.el7 | Fixed | RHSA-2014:1914 |
| CloudForms Management Engine 5 | mingw-ruby | Will not fix | n/a |
| CloudForms Management Engine 5 | ruby193-ruby | Will not fix | n/a |
| OpenShift Enterprise 1 | ruby193-ruby | Will not fix | n/a |
| Red Hat Enterprise Linux 5 | ruby | Not affected | n/a |
| Red Hat Enterprise Linux 6 | ruby | Not affected | n/a |
| Red Hat Hardened Images | ruby | Affected | n/a |
| Red Hat OpenStack Platform 3 | ruby193-ruby | Will not fix | n/a |
| Red Hat OpenStack Platform 4 | ruby193-ruby | Will not fix | n/a |
| Red Hat Satellite 6 | rubygem-rake | Not affected | n/a |
| Red Hat Subscription Asset Manager | ruby193-ruby | Will not fix | 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.
Metrics
No CVSS v4.0 score for this CVE.
No CVSS v3.1 score for this CVE.
No CVSS v3.0 score for this CVE.
AV:N/AC:L/Au:N/C:P/I:N/A:N
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
2022–2026- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (11 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 3.48% (0.03485) | 88.73th | v5 (v2026.06.15) |
| Jun 15, 2026 | 3.86% (0.03861) | 88.78th | v5 (v2026.06.15) |
| Mar 30, 2025 | 2.91% (0.02908) | 85.14th | v4 (v2025.03.14) |
| Mar 29, 2025 | 5.99% (0.05989) | 84.04th | v4 (v2025.03.14) |
| Mar 17, 2025 | 2.91% (0.02908) | 85.45th | v4 (v2025.03.14) |
| Dec 12, 2024 | 0.29% (0.00291) | 69.92th | v3 (v2023.03.01) |
| Feb 8, 2024 | 0.29% (0.00291) | 68.19th | v3 (v2023.03.01) |
| Mar 7, 2023 | 0.29% (0.00291) | 64.15th | 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) |
References (17)
- http://advisories.mageia.org/MGASA-2014-0472.html x_refsource_CONFIRMThird Party Advisory
- http://rhn.redhat.com/errata/RHSA-2014-1912.html vendor-advisoryx_refsource_REDHATThird Party Advisory
- http://rhn.redhat.com/errata/RHSA-2014-1913.html vendor-advisoryx_refsource_REDHATThird Party Advisory
- http://rhn.redhat.com/errata/RHSA-2014-1914.html vendor-advisoryx_refsource_REDHATThird Party Advisory
- http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46778 x_refsource_CONFIRMVendor Advisory
- http://www.debian.org/security/2015/dsa-3157 vendor-advisoryx_refsource_DEBIANThird Party Advisory
- http://www.mandriva.com/security/advisories?name=MDVSA-2015:129 vendor-advisoryx_refsource_MANDRIVABroken Link
- http://www.openwall.com/lists/oss-security/2014/07/09/13 mailing-listx_refsource_MLISTMailing List
- http://www.oracle.com/technetwork/topics/security/linuxbulletinjan2016-2867209.html x_refsource_CONFIRMThird Party Advisory
- http://www.securityfocus.com/bid/68474 vdb-entryx_refsource_BIDThird Party AdvisoryVDB Entry
- http://www.ubuntu.com/usn/USN-2397-1 vendor-advisoryx_refsource_UBUNTUThird Party Advisory
- https://access.redhat.com/security/cve/CVE-2014-4975 Vendor Advisory
- https://bugs.ruby-lang.org/issues/10019 x_refsource_CONFIRMVendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=1118158 x_refsource_CONFIRMIssue Tracking
- https://exchange.xforce.ibmcloud.com/vulnerabilities/94706 vdb-entryx_refsource_XF
- https://nvd.nist.gov/vuln/detail/CVE-2014-4975
- https://www.cve.org/CVERecord?id=CVE-2014-4975
Change history (0)
No recorded changes yet.