{"id":"CVE-2020-15237","aliases":["GHSA-5jjv-x4fq-qjwp"],"url":"https://o3.security/vulnerability/CVE-2020-15237","summary":"Possible timing attack in derivation_endpoint","details":"### 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).","published":"2020-10-05T19:15:15.103Z","modified":"2026-07-09T10:12:00.109864Z","cvss":{"score":5.9,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":null,"affectedPackages":[{"ecosystem":"RubyGems","name":"shrine","fixedVersion":"3.3.0"}],"fix":{"url":"https://github.com/shrinerb/shrine/commit/1b27090ce31543bf39f186c20ea47c8250fca2f0","label":"shrinerb/shrine@1b27090"},"references":[{"type":"ADVISORY","url":"https://github.com/shrinerb/shrine/security/advisories/GHSA-5jjv-x4fq-qjwp"},{"type":"FIX","url":"https://github.com/shrinerb/shrine/commit/1b27090ce31543bf39f186c20ea47c8250fca2f0"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-15237"},{"type":"WEB","url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/shrine/CVE-2020-15237.yml"},{"type":"PACKAGE","url":"https://github.com/shrinerb/shrine"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-07-09T10:12:00.109864Z"}}