Ruby 1.9.3/2.0.0/2.1.0 string.c str_buf_cat Long String data processing
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 4.8 | $0-$5k | 0.00 |
Summary
A vulnerability marked as problematic has been reported in Ruby 1.9.3/2.0.0/2.1.0. This vulnerability affects the function str_buf_cat of the file string.c. This manipulation as part of Long String causes data processing.
This vulnerability appears as CVE-2014-3916. In addition, an exploit is available.
It is suggested to upgrade the affected component.
Details
A vulnerability has been found in Ruby 1.9.3/2.0.0/2.1.0 (Programming Language Software) and classified as problematic. Affected by this vulnerability is the function str_buf_cat of the file string.c. The manipulation as part of a Long String leads to a data processing vulnerability. The CWE definition for the vulnerability is CWE-19. As an impact it is known to affect availability. The summary by CVE is:
The str_buf_cat function in string.c in Ruby 1.9.3, 2.0.0, and 2.1 allows context-dependent attackers to cause a denial of service (segmentation fault and crash) via a long string.
The weakness was presented 04/09/2014 by Hiroshi Shirosaki as Revision 45534 as confirmed commit (Trunk). It is possible to read the advisory at bugs.ruby-lang.org. This vulnerability is known as CVE-2014-3916 since 05/29/2014. The attack can be launched remotely. The exploitation doesn't need any form of authentication. Technical details and also a public exploit are known. Responsible for the vulnerability is the following code:
capa = (total + 4095) / 4096;
A public exploit has been developed by Ramon de C Valle and been published 2 months after the advisory. It is possible to download the exploit at seclists.org. It is declared as proof-of-concept. The code used by the exploit is:
A = "" 1000000.times do |i| A << "a" * 100000 end
Upgrading eliminates this vulnerability. Applying a patch is able to eliminate this problem. The bugfix is ready for download at bugs.ruby-lang.org. The best possible mitigation is suggested to be upgrading to the latest version. A possible mitigation has been published immediately after the disclosure of the vulnerability. The vulnerability will be addressed with the following lines of code:
capa = LONG_MAX - termlen;
The vulnerability is also documented in the databases at X-Force (93505) and SecurityFocus (BID 67705†). Be aware that VulDB is the high quality source for vulnerability data.
Product
Type
Name
Version
License
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 5.3VulDB Meta Temp Score: 4.8
VulDB Base Score: 5.3
VulDB Temp Score: 4.8
VulDB Vector: 🔍
VulDB Reliability: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
NVD Base Score: 🔍
Exploiting
Class: Data processingCWE: CWE-19
CAPEC: 🔍
ATT&CK: 🔍
Physical: No
Local: No
Remote: Yes
Availability: 🔍
Access: Public
Status: Proof-of-Concept
Author: Ramon de C Valle
Download: 🔍
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
OpenVAS ID: 801760
OpenVAS Name: Ruby str_buf_cat function Denial-of-Service Vulnerability (Windows)
OpenVAS File: 🔍
OpenVAS Family: 🔍
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
Reaction Time: 🔍
0-Day Time: 🔍
Exposure Time: 🔍
Exploit Delay Time: 🔍
Patch: bugs.ruby-lang.org
Timeline
04/09/2014 🔍04/09/2014 🔍
05/27/2014 🔍
05/27/2014 🔍
05/29/2014 🔍
06/03/2014 🔍
11/16/2014 🔍
10/19/2018 🔍
Sources
Advisory: Revision 45534Researcher: Hiroshi Shirosaki
Status: Confirmed
CVE: CVE-2014-3916 (🔍)
GCVE (CVE): GCVE-0-2014-3916
GCVE (VulDB): GCVE-100-13423
X-Force: 93505 - Ruby str_buf_cat() denial of service, Medium Risk
SecurityFocus: 67705 - Ruby 'string.c' Remote Memory Corruption Vulnerability
scip Labs: https://www.scip.ch/en/?labs.20161013
Entry
Created: 06/03/2014 16:52Updated: 10/19/2018 08:11
Changes: 06/03/2014 16:52 (71), 10/19/2018 08:11 (4)
Complete: 🔍
Cache ID: 216::103
Be aware that VulDB is the high quality source for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.