CVE-2012-2695
activerecord vulnerable to SQL Injection
Also known as GHSA-76wq-xw4h-f8wj
Mitigation
- Upgrade activerecord to one of 3.0.14, 3.1.6, 3.2.6, 2.3.15 (or later in the same release line).
Who should check
- Projects that depend on RubyGems package activerecord (>= 3.0.0.beta, < 3.0.14)
- Anyone running n/a (versions: see the vendor advisory)
Vulnerability facts
- Affected
- activerecord >= 3.0.0.beta, < 3.0.14
- Fixed in
- 3.0.14, 3.1.6, 3.2.6, 2.3.15
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- Yes: see the exploit references below
- Remote exploitation
- Remote, no login needed
- CVSS
- 7.5 (v2.0, NVD)AV:N/AC:L/Au:N/C:P/I:P/A:P
Show all 6 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Authentication: None
- Confidentiality impact: Partial
- Integrity impact: Partial
- Availability impact: Partial
- EPSS
- 2.95% chance of exploitation in 30 days (percentile 88, 2026-11-26)
- CWE
- CWE-89
- Modified
Description
The Active Record component in Ruby on Rails before 3.0.14, 3.1.x before 3.1.6, and 3.2.x before 3.2.6 does not properly implement the passing of request data to a where method in an ActiveRecord class, which allows remote attackers to conduct certain SQL injection attacks via nested query parameters that leverage improper handling of nested hashes, a related issue to CVE-2012-2661.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| RubyGems activerecord | >= 3.0.0.beta, < 3.0.14 | 3.0.14, 3.1.6, 3.2.6, 2.3.15 | osv |
| n/a | — | — | nvd |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2012-2695. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2012-2695.md Affected: activerecord >= 3.0.0.beta, < 3.0.14 Fixed in: 3.0.14, 3.1.6, 3.2.6, 2.3.15 Steps: 1. Search this machine and project for activerecord (RubyGems), n/a: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
- http://lists.opensuse.org/opensuse-security-announce/2012-08/msg00014.html
- http://lists.opensuse.org/opensuse-security-announce/2012-08/msg00002.html
- http://lists.opensuse.org/opensuse-security-announce/2012-08/msg00016.html
- http://lists.opensuse.org/opensuse-updates/2012-08/msg00046.html
- http://rhn.redhat.com/errata/RHSA-2013-0154.html
- https://nvd.nist.gov/vuln/detail/CVE-2012-2695
Exploits and PoCs
FAQ
Is CVE-2012-2695 being exploited?
There is no confirmed exploitation: CVE-2012-2695 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 2.95% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2012-2695?
High: CVSS 7.5 (v2.0, scored by NVD). Remote, no login needed.
Which versions are affected by CVE-2012-2695?
activerecord >= 3.0.0.beta, < 3.0.14.
Is there a fix for CVE-2012-2695?
Yes. Fixed in 3.0.14, 3.1.6, 3.2.6, 2.3.15. Upgrade activerecord to one of 3.0.14, 3.1.6, 3.2.6, 2.3.15 (or later in the same release line).
How do I check if I'm affected by CVE-2012-2695?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.