CVE-2025-57821 — Vulnerability in google_sign_in — CVE Details
Google Sign-In for Rails allowed redirects to malformed URLs
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.42%). Schedule for your next planned update.
Does your project use an affected google_sign_in version?
Paste your Gemfile.lock to check it for CVE-2025-57821 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
It is possible to craft a malformed URL that passes the "same origin" check, resulting in the user being redirected to another origin.
Details
The 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.
Normally 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.
Impact
Rails 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.
Workarounds
If 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.
Credits
This issue was responsibly reported by Hackerone user muntrive.
Advisory Timeline
- First published August 27, 2025 (456 days ago).
- Last revised August 29, 2025 — 2 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install google_sign_in -v 1.3.0
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: RubyGems (1).
| Package | Fixed In |
|---|---|
| google_sign_in RubyGems · Affected: 0.1, 0.1.1, 0.1.2, 0.1.3 (+9 more) | 1.3.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-601Open RedirectMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 4.2 score means for each attack dimension.
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
References
- https://github.com/basecamp/google_sign_in/security/advisories/GHSA-7pwc-wh6m-44q3WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-57821ADVISORY
- https://github.com/basecamp/google_sign_in/pull/73WEB
- https://github.com/basecamp/google_sign_in/commit/85903651201257d4f14b97d4582e6d968ac32f15WEB
- https://github.com/basecamp/google_sign_in/commit/a0548a604fb17e4eb1a57029f0d87e34e8499623WEB
- https://github.com/basecamp/google_sign_inPACKAGE
- https://github.com/basecamp/google_sign_in/releases/tag/v1.3.0WEB
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/google_sign_in/CVE-2025-57821.ymlWEB
Frequently Asked Questions
- What is CVE-2025-57821?
- Google Sign-In for Rails allowed redirects to malformed URLs. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 4.2/10).
- How do I check if my project is affected by CVE-2025-57821?
- CVE-2025-57821 affects google_sign_in. It has a 0.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-57821 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is a below-median EPSS score — only 28.1% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-128084MEDIUM
sqlite3-ruby: Possible SQL query truncation when a string is 4 GiB or larger
- CVE-2025-58067MEDIUM
Google Sign-In for Rails allowed redirect to protocol-relative URI
- CVE-2026-115472MEDIUM
Doorkeeper: When using public clients, any client can revoke any access token