CVE-2025-57821: Google sign in Google Sign-In For Rails Allowed Vulnerability
MODERATECVE-2025-57821 is a MODERATE (CVSS 4.2) google sign-in for rails allowed vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Google sign in libraries in the RubyGems ecosystem. The issue involves google sign-in for rails allowed redirects to malformed urls. Remediation is available by upgrading affected packages to version 1.3.0.
CVE-2025-57821 at a Glance
Security Impact
CVSS: 4.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N).
How to Fix CVE-2025-57821
To remediate this vulnerability, upgrade all affected Google sign in dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade google_sign_in to 1.3.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for google_sign_in
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-57821, inspect your project dependencies for Google sign in:
inspect dependencies for google_sign_in
Analyze the terminal output to locate any version of Google sign in in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Google sign in, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-57821 Affected Google sign in Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
google_sign_in
|
RubyGems |
< 1.3.0
|
1.3.0
|
References
Frequently Asked Questions
What is CVE-2025-57821?
Which Google sign in versions are affected?
What version fixes CVE-2025-57821?
Is google_sign_in affected?
What is the CVSS score of CVE-2025-57821?
What CWE is associated with CVE-2025-57821?
How can I check RubyGems dependencies for CVE-2025-57821?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7pwc-wh6m-44q3",
"modified" : "2025-08-29T15:22:58Z",
"published" : "2025-08-27T16:46:16Z",
"aliases" : [ "CVE-2025-57821" ],
"summary" : "Google Sign-In for Rails allowed redirects to malformed URLs",
"details" : "### Summary\n\nIt is possible to craft a malformed URL that passes the \"same origin\" check, resulting in the user being redirected to another origin.\n\n### Details\n\nThe google_sign_in gem persists an optional URL for redirection after authentication. If this URL is malformed, it's possible for the user to be redirected to another origin after authentication, possibly resulting in exposure of authentication information such as the token.\n\nNormally the value of this URL is only written and read by the library. If applications are configured to store session information in a database, there is no known vector to exploit this vulnerability. However, applications may be configured to store this information in a session cookie, in which case it may be chained with a session cookie attack to inject a crafted URL.\n\n### Impact\n\nRails applications configured to store the `flash` information in a session cookie may be vulnerable, if this can be chained with an attack that allows injection of arbitrary data into the session cookie.\n\n### Workarounds\n\nIf you are unable to upgrade this library, then you may mitigate the chained attack by explicitly setting `SameSite=Lax` or `SameSite=Strict` on the application session cookie.\n\n### Credits\n\nThis issue was responsibly reported by Hackerone user [muntrive](https://hackerone.com/muntrive?type=user).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "google_sign_in"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.3.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/basecamp/google_sign_in/security/advisories/GHSA-7pwc-wh6m-44q3"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-57821"
}, {
"type" : "WEB",
"url" : "https://github.com/basecamp/google_sign_in/pull/73"
}, {
"type" : "WEB",
"url" : "https://github.com/basecamp/google_sign_in/commit/85903651201257d4f14b97d4582e6d968ac32f15"
}, {
"type" : "WEB",
"url" : "https://github.com/basecamp/google_sign_in/commit/a0548a604fb17e4eb1a57029f0d87e34e8499623"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/basecamp/google_sign_in"
}, {
"type" : "WEB",
"url" : "https://github.com/basecamp/google_sign_in/releases/tag/v1.3.0"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/google_sign_in/CVE-2025-57821.yml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-601" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-08-27T16:46:16Z",
"nvd_published_at" : "2025-08-27T17:15:48Z"
}
}