CVE-2018-18476: mysql-bunuuid-rails vulnerable to SQL injection
9.8
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.53401%
CWE
Published
10/30/2018
Updated
8/25/2023
KEV Status
No
Technology
Ruby
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
mysql-binuuid-rails | rubygems | < 1.1.1 | 1.1.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from improper input validation in the serialize method handling UUID conversion. The pre-patch implementation in lib/mysql-binuuid/type.rb's serialize method removed UUID dashes but didn't validate if the result was a valid 32-character hexadecimal string. This allowed attackers to inject arbitrary SQL through malformed UUID values, as ActiveRecord's Binary type relies on implicit hex conversion for safety. The fix added a regex validation (valid_undashed_uuid?) to enforce hexadecimal format, which confirms this was the vulnerable point. The added test cases explicitly demonstrate SQL injection prevention through this validation.