{"id":"CVE-2025-57821","aliases":["CVE-2025-57821","GHSA-7pwc-wh6m-44q3"],"related":[],"kind":"vulnerability","state":"published","title":"Basecamp's Google Sign-In for Rails allowed redirects to a malformed URL","summary":"Basecamp's Google Sign-In adds Google sign-in to Rails applications. Prior to version 1.3.0, it is possible to craft a malformed URL that passes the \"same origin\" check, resulting in the user being redirected to another origin. 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. This issue has been patched in version 1.3.0. If upgrading is not possible at this time, a way to mitigate the chained attack can be done by explicitly setting SameSite=Lax or SameSite=Strict on the application session cookie.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Basecamp's Google Sign-In adds Google sign-in to Rails applications. Prior to version 1.3.0, it is possible to craft a malformed URL that passes the \"same origin\" check, resulting in the user being redirected to another origin. 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. This issue has been patched in version 1.3.0. If upgrading is not possible at this time, a way to mitigate the chained attack can be done by explicitly setting SameSite=Lax or SameSite=Strict on the application session cookie.","source":"cvelist"},{"lang":"en","text":"### 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).","format":"markdown","source":"ghsa"},{"lang":"es","text":"El inicio de sesión de Google de Basecamp incorpora el inicio de sesión de Google a las aplicaciones Rails. Antes de la versión 1.3.0, era posible manipular una URL mal formada que superara la comprobación de \"mismo origen\", lo que provocaba que el usuario fuera redirigido a otro origen. Las aplicaciones Rails configuradas para almacenar la información flash en una cookie de sesión pueden ser vulnerables si esto se combina con un ataque que permita la inyección de datos arbitrarios en la cookie de sesión. Este problema se ha corregido en la versión 1.3.0. Si la actualización no es posible en este momento, se puede mitigar el ataque encadenado configurando explícitamente SameSite=Lax o SameSite=Strict en la cookie de sesión de la aplicación.","source":"nvd"}],"published":"2025-08-27T16:32:36.284Z","modified":"2026-06-17T09:43:30.010Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N","score":4.2,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N","score":4.2,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N","score":4.2,"rating":"MEDIUM"}],"cwes":["CWE-601"],"affected":[{"ranges":[{"version":"< 1.3.0","status":"affected"}],"vendor":"basecamp","product":"google_sign_in","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.3.0"}],"ecosystem":"RubyGems","package":"google_sign_in","purl":"pkg:gem/google_sign_in","source":"ghsa"}],"references":[{"url":"https://github.com/basecamp/google_sign_in/security/advisories/GHSA-7pwc-wh6m-44q3","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/basecamp/google_sign_in/pull/73","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/basecamp/google_sign_in/commit/85903651201257d4f14b97d4582e6d968ac32f15","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/basecamp/google_sign_in/releases/tag/v1.3.0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-57821","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/basecamp/google_sign_in/commit/a0548a604fb17e4eb1a57029f0d87e34e8499623","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/basecamp/google_sign_in","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/google_sign_in/CVE-2025-57821.yml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-08-27T18:52:45.946Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-57821","url":"https://www.cve.org/CVERecord?id=CVE-2025-57821","licence":"CVE Terms of Use","modified":"2025-08-27T18:53:03.636Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7pwc-wh6m-44q3","url":"https://github.com/advisories/GHSA-7pwc-wh6m-44q3","licence":"CC-BY-4.0","modified":"2025-08-29T15:49:18.210Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-57821","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-57821","licence":"Public domain","modified":"2026-06-17T09:43:30.010Z"}],"updatedAt":"2026-11-25T22:59:03.762Z","epss":{"score":0.00285,"percentile":0.22585,"date":"2026-12-01T12:00:22.000Z"}}