Staging Environment: Content and features may be unstable or change without notice.
Search for packages
Package details: pkg:gem/activerecord@6.1.2.1
purl pkg:gem/activerecord@6.1.2.1
Next non-vulnerable version 7.1.5.2
Latest non-vulnerable version 8.0.2.1
Risk
Vulnerabilities affecting this package (4)
Vulnerability Summary Fixed by
VCID-dp3h-z1zs-ufba
Aliases:
CVE-2022-32224
GHSA-3hhc-qp5v-9p2j
activerecord: Possible RCE escalation bug with Serialized Columns in Active Record
6.1.6.1
Affected by 3 other vulnerabilities.
7.0.0.alpha1
Affected by 1 other vulnerability.
7.0.3.1
Affected by 3 other vulnerabilities.
VCID-nzb9-vn9k-jbgs
Aliases:
CVE-2022-44566
GHSA-579w-22j4-4749
GMS-2023-59
Denial of Service Vulnerability in ActiveRecord's PostgreSQL adapter There is a potential denial of service vulnerability present in ActiveRecord's PostgreSQL adapter. This has been assigned the CVE identifier CVE-2022-44566. Versions Affected: All. Not affected: None. ## Fixed Versions - 2.3.18.47 (Rails LTS, which is a paid service and not part of the rubygem) - 3.2.22.34 (Rails LTS, which is a paid service and not part of the rubygem) - 4.2.11.27 (Rails LTS, which is a paid service and not part of the rubygem) - 5.2.8.15 (Rails LTS, which is a paid service and not part of the rubygem) - 6.1.7.1 - 7.0.4.1 ## Impact In ActiveRecord < 7.0.4.1 and < 6.1.7.1, when a value outside the range for a 64bit signed integer is provided to the PostgreSQL connection adapter, it will treat the target column type as numeric. Comparing integer values against numeric values can result in a slow sequential scan resulting in potential Denial of Service. ## Releases The fixed releases are available at the normal locations. ## Workarounds Ensure that user supplied input which is provided to ActiveRecord clauses do not contain integers wider than a signed 64bit representation or floats. ## Patches To aid users who aren't able to upgrade immediately we have provided patches for the supported release series in accordance with our maintenance policy 1 regarding security issues. They are in git-am format and consist of a single changeset. 6-1-Added-integer-width-check-to-PostgreSQL-Quoting.patch - Patch for 6.1 series 7-0-Added-integer-width-check-to-PostgreSQL-Quoting.patch - Patch for 7.0 series
6.1.7.1
Affected by 1 other vulnerability.
7.0.4.1
Affected by 1 other vulnerability.
VCID-whvz-g2g9-auek
Aliases:
CVE-2023-22794
GHSA-hq7p-j377-6v63
GMS-2023-60
SQL Injection Vulnerability via ActiveRecord comments There is a possible vulnerability in ActiveRecord related to the sanitization of comments. This vulnerability has been assigned the CVE identifier CVE-2023-22794. Versions Affected: >= 6.0.0 Not affected: < 6.0.0 Fixed Versions: 6.0.6.1, 6.1.7.1, 7.0.4.1 Impact Previously the implementation of escaping for comments was insufficient for If malicious user input is passed to either the annotate query method, the optimizer_hints query method, or through the QueryLogs interface which automatically adds annotations, it may be sent to the database with insufficient sanitization and be able to inject SQL outside of the comment. In most cases these interfaces won’t be used with user input and users should avoid doing so. Example vulnerable code: ``` Post.where(id: 1).annotate("#{params[:user_input]}") Post.where(id: 1).optimizer_hints("#{params[:user_input]}") ``` Example vulnerable QueryLogs configuration (the default configuration is not vulnerable): ``` config.active_record.query_log_tags = [ { something: -> { <some value including user input> } } ] ``` All users running an affected release should either upgrade or use one of the workarounds immediately. Releases The FIXED releases are available at the normal locations. Workarounds Avoid passing user input to annotate and avoid using QueryLogs configuration which can include user input. Patches To aid users who aren’t able to upgrade immediately we have provided patches for the two supported release series. They are in git-am format and consist of a single changeset. 6-0-Make-sanitize_as_sql_comment-more-strict.patch - Patch for 6.0 series 6-1-Make-sanitize_as_sql_comment-more-strict.patch - Patch for 6.1 series 7-0-Make-sanitize_as_sql_comment-more-strict.patch - Patch for 7.0 series Please note that only the 7.0.Z and 6.1.Z series are supported at present, and 6.0.Z for severe vulnerabilities. Users of earlier unsupported releases are advised to upgrade as soon as possible as we cannot guarantee the continued availability of security fixes for unsupported releases.
6.1.7.1
Affected by 1 other vulnerability.
7.0.4.1
Affected by 1 other vulnerability.
VCID-xnj2-tbzn-tff6
Aliases:
CVE-2025-55193
GHSA-76r7-hhxj-r776
activerecord: Active Record ANSI Injection Vulnerability
7.1.5.2
Affected by 0 other vulnerabilities.
7.2.0.beta1
Affected by 1 other vulnerability.
7.2.2.2
Affected by 0 other vulnerabilities.
8.0.0.beta1
Affected by 1 other vulnerability.
8.0.2.1
Affected by 0 other vulnerabilities.
Vulnerabilities fixed by this package (1)
Vulnerability Summary Aliases
VCID-enf4-jrzh-nyac Active Record subject to Regular Expression Denial-of-Service (ReDoS) The PostgreSQL adapter in Active Record before 6.1.2.1, 6.0.3.5, 5.2.4.5 suffers from a regular expression denial of service (REDoS) vulnerability. Carefully crafted input can cause the input validation in the `money` type of the PostgreSQL adapter in Active Record to spend too much time in a regular expression, resulting in the potential for a DoS attack. This only impacts Rails applications that are using PostgreSQL along with money type columns that take user input. CVE-2021-22880
GHSA-8hc4-xxm3-5ppp