CVE-2012-4522Ruby-lang Ruby
Medium 5.0 No auth needed
Follow: this CVE · Ruby-lang · Ruby-lang Ruby We alert you by email or Slack (account required).
- Priority
- 45
- CVSS 2.0
- 5.0
- EPSS
- 2.2% probability of exploitation in 30 days · percentile 83
- Auth required
- No
- Published
- Nov 24, 2012
- Updated
- Jun 16, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-264
- Vector
AV:N/AC:L/Au:N/C:N/I:P/A:N
What happens
The rb_get_path_check function in file.c in Ruby 1.9.3 before patchlevel 286 and Ruby 2.0.0 before r37163 allows context-dependent attackers to create files in unexpected locations or with unexpected names via a NUL byte in a file path.
What to do
- Apply the vendor's security update for Ruby.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| ruby-lang | ruby | 1.9.3 |
| ruby-lang | ruby | 2.0.0 |
Official sources
References
Links published by the sources. Open them with care.