There are two distinct but related vulnerabilities in PostgreSQL
adapter for Active Record. These vulnerabilities have been assigned
the CVE identifiers CVE-2014-3482 and CVE-2014-3483.
Versions Affected: All Versions > 2.0
Not affected: Databases other than PostgreSQL
Fixed Versions: 3.2.19, 4.0.7 & 4.1.3
PostgreSQL supports a number of unique data types which are not
present in other supported databases. A bug in the SQL quoting code
in ActiveRecord can allow an attacker to inject arbitrary SQL using
carefully crafted values.
Only applications which query against either bitstring or range types
are vulnerable. The particular data types affected depend on the
version of Rails you're using, but the vulnerable code will look the
same. Vulnerable code will take either take the form of:
The specific versions affected is included below, however all users
running an affected release should upgrade immediately.
SQL Injection Vulnerability in 'bitstring' quoting
Versions Affected: 2.0.0-3.2.18
Not Affected: 4.0 and Later
SQL Injection Vulnerability in 'range' quoting
Versions Affected: 4.0.0-4.1.2
Not Affected: All versions prior to 4.0.0
The 3.2.19, 4.0.7 & 4.1.3 releases are available at the normal locations.
The only feasible workaround for this issue is to not allow user
controlled values to be used in queries with the affected data types.
Given the difficulty of ensuring this, upgrading is strongly advised.
To aid users who aren't able to upgrade immediately we have provided
patches for the two supported release series and the last major
release series. They are in git-am format and consist of a single
* 4-1-postgres-sqli.patch - Patch for 4.1 series
* 4-0-postgres-sqli.patch - Patch for 4.0 series
* 3-2-postgres-sqli.patch - Patch for 3.2 series
Please note that only the 4.0.x and 4.1.x series receive regular
security updates at present. Users of earlier unsupported releases
are advised to upgrade as soon as possible as we cannot guarantee the
continued availability of security fixes for earlier releases.
Thanks to Sean Griffin of thoughtbot for reporting the vulnerability
to us, and to Jeff Jarmoc of Matasano and Charlie Somerville of GitHub
for working with us to review the patches and advisories.
Rails 3.2.19, 4.0.8, and 4.0.9 are now in the tree.
(In reply to Hans de Graaff from comment #1)
> Rails 3.2.19, 4.0.8, and 4.0.9 are now in the tree.
That should be 3.2.19, 4.0.8, and 4.1.4...
Closing as noglsa.
Re-opening for cleanup
@maintainers: Thanks for adding the ebuild, as this package does not need stabilization we're mostly done, but please remove all vulnerable versions.
Vulnerable versions have been removed.
Maintainer(s), Thank you for cleanup!
No GLSA - Closing Bug as Resolved
SQL injection vulnerability in
the PostgreSQL adapter for Active Record in Ruby on Rails 4.x before 4.0.7
and 4.1.x before 4.1.3 allows remote attackers to execute arbitrary SQL
commands by leveraging improper range quoting.
SQL injection vulnerability in
the PostgreSQL adapter for Active Record in Ruby on Rails 2.x and 3.x before
3.2.19 allows remote attackers to execute arbitrary SQL commands by
leveraging improper bitstring quoting.