{"id":"CVE-2020-15237","aliases":["CVE-2020-15237","GHSA-5jjv-x4fq-qjwp"],"related":[],"kind":"vulnerability","state":"published","title":"Timing attack in Shrine","summary":"In Shrine before version 3.3.0, when using the `derivation_endpoint` plugin, it's possible for the attacker to use a timing attack to guess the signature of the derivation URL. The problem has been fixed by comparing sent and calculated signature in constant time, using `Rack::Utils.secure_compare`. Users using the `derivation_endpoint` plugin are urged to upgrade to Shrine 3.3.0 or greater. A possible workaround is provided in the linked advisory.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In Shrine before version 3.3.0, when using the `derivation_endpoint` plugin, it's possible for the attacker to use a timing attack to guess the signature of the derivation URL. The problem has been fixed by comparing sent and calculated signature in constant time, using `Rack::Utils.secure_compare`. Users using the `derivation_endpoint` plugin are urged to upgrade to Shrine 3.3.0 or greater. A possible workaround is provided in the linked advisory.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nWhen using the `derivation_endpoint` plugin, it's possible for the attacker to use a timing attack to guess the signature of the derivation URL.\n\n### Patches\n\nThe problem has been fixed by comparing sent and calculated signature in constant time, using `Rack::Utils.secure_compare`. Users using the `derivation_endpoint` plugin are urged to upgrade to Shrine 3.3.0 or greater.\n\n### Workarounds\n\nUsers of older Shrine versions can apply the following monkey-patch after loading the `derivation_endpoint` plugin:\n\n```rb\nclass Shrine\n  class UrlSigner\n    def verify_signature(string, signature)\n      if signature.nil?\n        fail InvalidSignature, \"missing \\\"signature\\\" param\"\n      elsif !Rack::Utils.secure_compare(signature, generate_signature(string))\n        fail InvalidSignature, \"provided signature does not match the calculated signature\"\n      end\n    end\n  end\nend\n```\n\n### References\n\nYou can read more about timing attacks [here](https://en.wikipedia.org/wiki/Timing_attack).","format":"markdown","source":"ghsa"},{"lang":"es","text":"En Shrine versiones anteriores a 3.3.0, cuando se usa el plugin \"derivation_endpoint\", es posible que el atacante use un ataque de sincronización para adivinar la firma de la URL de derivación. El problema ha sido corregido al comparar la firma enviada y la calculada en tiempo constante, usando la función \"Rack::Utils.secure_compare\". Se insta a usuarios que usan el plugin \"derivation_endpoint\" a actualizar a Shrine versión 3.3.0 o superior. Se proporciona una posible solución alternativa en el aviso vinculado","source":"nvd"}],"published":"2020-10-05T15:48:34.000Z","modified":"2026-07-08T06:29:09.017Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:P/I:N/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-203","CWE-208"],"affected":[{"ranges":[{"version":"< 3.3.0","status":"affected"}],"vendor":"shrinerb","product":"shrine","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.3.0"}],"ecosystem":"RubyGems","package":"shrine","purl":"pkg:gem/shrine","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.3.0"}],"vendor":"shrinerb","product":"shrine","cpe":"cpe:2.3:a:shrinerb:shrine:*:*:*:*:*:ruby:*:*","source":"nvd"}],"references":[{"url":"https://github.com/shrinerb/shrine/security/advisories/GHSA-5jjv-x4fq-qjwp","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/shrinerb/shrine/commit/1b27090ce31543bf39f186c20ea47c8250fca2f0","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-15237","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/shrine/CVE-2020-15237.yml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/shrinerb/shrine","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-15237","url":"https://www.cve.org/CVERecord?id=CVE-2020-15237","licence":"CVE Terms of Use","modified":"2024-08-04T13:08:22.833Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5jjv-x4fq-qjwp","url":"https://github.com/advisories/GHSA-5jjv-x4fq-qjwp","licence":"CC-BY-4.0","modified":"2026-07-08T06:29:09.017Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-15237","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-15237","licence":"Public domain","modified":"2026-06-17T02:56:19.943Z"}],"updatedAt":"2026-11-25T22:57:55.044Z","epss":{"score":0.01015,"percentile":0.64237,"date":"2026-12-01T12:00:22.000Z"}}