cbcvebase.
CVE-2013-0333
published 2013-01-30

CVE-2013-0333: lib/active_support/json/backends/yaml.rb in Ruby on Rails 2.3.x before 2.3.16 and 3.0.x before 3.0.20 does not properly convert JSON data to YAML data for…

PriorityP276high7.5CVSS 2.0
AVNACLAuNCPIPAP
EXPLOIT
EPSS
95.57%
99.9th percentile
lib/active_support/json/backends/yaml.rb in Ruby on Rails 2.3.x before 2.3.16 and 3.0.x before 3.0.20 does not properly convert JSON data to YAML data for processing by a YAML parser, which allows remote attackers to execute arbitrary code, conduct SQL injection attacks, or bypass authentication via crafted data that triggers unsafe decoding, a different vulnerability than CVE-2013-0156.

Affected

37 ranges· showing 25
VendorProductVersion rangeFixed in
debianrails< rails 2.3.14.1 (bookworm)rails 2.3.14.1 (bookworm)
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——
rubyonrailsrails——

Detection & IOCsextracted from sources · hover to see the quote

pathlib/active_support/json/backends/yaml.rb↗
other--- !ruby/hash:ActionController::Routing::RouteSet::NamedRouteCollection↗
other--- !ruby/hash:ActionDispatch::Routing::RouteSet::NamedRouteCollection↗
other!ruby/object:ActionController::Routing::Route↗
other!ruby/object:OpenStruct↗
  • →Exploit sends requests with Content-Type 'application/json' containing embedded YAML payloads using !ruby/hash and !ruby/object tags; inspect JSON request bodies for YAML deserialization gadget strings. ↗
  • →Exploit sets the X-HTTP-Method-Override header to 'get' alongside the malicious JSON body; this header combination is a strong indicator of exploitation attempts. ↗
  • →Payload is base64-encoded and decoded at runtime via .unpack('m0'); look for base64 blobs inside JSON request bodies paired with eval() calls. ↗
  • →Colons in the YAML payload are Unicode-escaped as \u003a to bypass naive filters; detection rules should normalize or decode Unicode escapes before matching. ↗
  • →Exploit sends two sequential requests, one targeting Rails 2 (ActionController) and one targeting Rails 3 (ActionDispatch); two near-simultaneous JSON POST requests with YAML gadget bodies to the same URI is a strong signal. ↗
  • ·The code execution technique used by the Metasploit module requires Ruby 1.9; Ruby 1.8 targets may still be vulnerable via init_with() but this vector was not demonstrated and may require a different payload. ↗
  • ·The HTTP method used for exploitation is configurable (GET, POST, PUT); detection rules should not restrict matching to a single HTTP verb. ↗
  • ·The target URI path is configurable by the attacker; there is no fixed path to block — any application endpoint accepting JSON is potentially vulnerable. ↗

CVSS provenance

nvdv2.07.5HIGHAV:N/AC:L/Au:N/C:P/I:P/A:P
ghsa7.5HIGH
osv7.5HIGH
vendor_debian7.5HIGH
vendor_redhat7.5HIGH
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.