Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wpscan fails with ruby 3.4 fails with parse error: invalid object key (must be a string) #1881

Open
gnuletik opened this issue Jan 7, 2025 · 0 comments

Comments

@gnuletik
Copy link

gnuletik commented Jan 7, 2025

Subject of the issue

When running WPScan with Ruby 3.4, the wpscan stops unexpectedly.

Your environment

  • Version of WPScan: v3.8.27
  • Version of Ruby: 3.4
  • Operating System (OS): Ubuntu 24.04.1 (Noble Numbat)

Steps to reproduce

wpscan --url http://localhost -f json -o output.json -e ap,vt,u

Expected behavior

The following crash occurs:
"/usr/local/bundle/gems/yajl-ruby-1.4.3/lib/yajl/json_gem/parsing.rb:15:in 'JSON.parse': parse error: invalid object key (must be a string) (JSON::ParserError)\n 3'\"], \"confirmed_by\": { null: { \"confidence\": 60, \n (right here) ------^\n\n\tfrom /usr/local/bundle/gems/cms_scanner-0.14.3/app/formatters/json.rb:10:in 'CMSScanner::Formatter::Json#beautify'\n\tfrom /usr/local/bundle/gems/cms_scanner-0.14.3/lib/cms_scanner/scan.rb:42:in 'CMSScanner::Scan#run'\n\tfrom /usr/local/bundle/gems/wpscan-3.8.27/bin/wpscan:17:in 'block in <top (required)>'\n\tfrom /usr/local/bundle/gems/cms_scanner-0.14.3/lib/cms_scanner/scan.rb:15:in 'CMSScanner::Scan#initialize'\n\tfrom /usr/local/bundle/gems/wpscan-3.8.27/bin/wpscan:6:in 'Class#new'\n\tfrom /usr/local/bundle/gems/wpscan-3.8.27/bin/wpscan:6:in '<top (required)>'\n\tfrom /usr/local/bundle/bin/wpscan:25:in 'Kernel#load'\n\tfrom /usr/local/bundle/bin/wpscan:25:in '<main>'\n/usr/local/bundle/gems/yajl-ruby-1.4.3/lib/yajl.rb:44:in 'Yajl::Parser#parse': parse error: invalid object key (must be a string) (Yajl::ParseError)\n 3'\"], \"confirmed_by\": { null: { \"confidence\": 60, \n (right here) ------^\n\n\tfrom /usr/local/bundle/gems/yajl-ruby-1.4.3/lib/yajl.rb:44:in 'Yajl::Parser.parse'\n\tfrom /usr/local/bundle/gems/yajl-ruby-1.4.3/lib/yajl/json_gem/parsing.rb:13:in 'JSON.parse'\n\tfrom /usr/local/bundle/gems/cms_scanner-0.14.3/app/formatters/json.rb:10:in 'CMSScanner::Formatter::Json#beautify'\n\tfrom /usr/local/bundle/gems/cms_scanner-0.14.3/lib/cms_scanner/scan.rb:42:in 'CMSScanner::Scan#run'\n\tfrom /usr/local/bundle/gems/wpscan-3.8.27/bin/wpscan:17:in 'block in <top (required)>'\n\tfrom /usr/local/bundle/gems/cms_scanner-0.14.3/lib/cms_scanner/scan.rb:15:in 'CMSScanner::Scan#initialize'\n\tfrom /usr/local/bundle/gems/wpscan-3.8.27/bin/wpscan:6:in 'Class#new'\n\tfrom /usr/local/bundle/gems/wpscan-3.8.27/bin/wpscan:6:in '<top (required)>'\n\tfrom /usr/local/bundle/bin/wpscan:25:in 'Kernel#load'\n\tfrom /usr/local/bundle/bin/wpscan:25:in '<main>'"

Actual behavior

It should not crash.

What have you already tried

Things you have tried (where relevant):

  • Update WPScan to the latest version [x]
  • Update Ruby to the latest version [x]
  • Ensure you can reach the target site using cURL [x]
  • Proxied WPScan through a HTTP proxy to view the raw traffic [ ]
  • Ensure you are using a supported Operating System (Linux and macOS) [x]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant