Skip to content

Instantly share code, notes, and snippets.

@purintai
Last active March 25, 2020 03:33
Show Gist options
  • Save purintai/e6bd02d46432f9f99e7349c65dd73ea8 to your computer and use it in GitHub Desktop.
Save purintai/e6bd02d46432f9f99e7349c65dd73ea8 to your computer and use it in GitHub Desktop.
CVE-2020-10663
# for CVE-2020-10663
# https://www.ruby-lang.org/en/news/2020/03/19/json-dos-cve-2020-10663/
if Gem::Version.create(JSON::VERSION) < Gem::Version.create('2.3.0')
module JSON
class << self
alias :old_parse :parse
def parse(json, args = {})
old_parse(json, args || {})
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment