Skip to content
Info disclosure Disclosed report Beginner

(FULL PATH DISCLOSURE) Unknown MySQL server host 'shardm-reader.chi2.shopify.io'

A staging instance of the application was publicly accessible without authentication and had verbose error messages enabled. An attacker could trigger a database connection error to obtain a full stack trace revealing internal file paths and application source code structure.

jamesclyde Follow

Originally disclosed on HackerOne

  • Fixed in under an hour
  • Paid in 23 days
  • Disclosed after 23 days

Summary by the program

A staging instance of the application was available with no authentication at shardm-reader.chi2.shopify.io. Since this instance had verbose errors turned on, any error message would contain information about the application's environment variables, and part of the stack trace with application source code.

The report

Hello,

Found a website of you guys that is poiting to: shardm-reader.chi2.shopify.io' This domain is disclosure fill path because there is none MySQL server host.

POC: https://104.196.154.1/

Response a whole page with path disclosures:

lib/patches/mysql_monitoring.rb:19:in connect' lib/patches/mysql_monitoring.rb:19:in block in raw_connect_with_monitoring' lib/patches/mysql_monitoring.rb:18:in raw_connect_with_monitoring' lib/routing/connection.rb:15:in connection' app/models/concerns/benchmarking.rb:15:in block (2 levels) in add_benchmark_around_method' app/models/concerns/benchmarking.rb:24:in with_benchmark' app/models/concerns/benchmarking.rb:14:in block in add_benchmark_around_method' app/models/shop.rb:619:in for_domain' app/controllers/application_controller.rb:303:in shop_for' app/controllers/application_controller.rb:96:in with_shop_fallback' app/controllers/application_controller.rb:87:in with_shop' app/controllers/application_controller.rb:73:in set_billing_api_request_id' app/controllers/application_controller.rb:64:in add_request_id_to_log_context' app/controllers/application_controller.rb:245:in conditionally_enable_debug_log' app/controllers/application_controller.rb:54:in block in identity_cache_memoization' app/controllers/application_controller.rb:54:in identity_cache_memoization' /artifacts/ruby/2.2.0/bundler/gems/statsd-instrument-50b2496ea65b/lib/statsd/instrument.rb:284:in call' /artifacts/ruby/2.2.0/bundler/gems/statsd-instrument-50b2496ea65b/lib/statsd/instrument.rb:284:in block in measure' /artifacts/ruby/2.2.0/bundler/gems/statsd-instrument-50b2496ea65b/lib/statsd/instrument.rb:53:in duration' /artifacts/ruby/2.2.0/bundler/gems/statsd-instrument-50b2496ea65b/lib/statsd/instrument.rb:284:in measure' /artifacts/ruby/2.2.0/bundler/gems/statsd-instrument-50b2496ea65b/lib/statsd/instrument.rb:75:in block (3 levels) in statsd_measure' /artifacts/ruby/2.2.0/bundler/gems/statsd-instrument-50b2496ea65b/lib/statsd/instrument.rb:284:in call' /artifacts/ruby/2.2.0/bundler/gems/statsd-instrument-50b2496ea65b/lib/statsd/instrument.rb:284:in block in measure' /artifacts/ruby/2.2.0/bundler/gems/statsd-instrument-50b2496ea65b/lib/statsd/instrument.rb:53:in duration' /artifacts/ruby/2.2.0/bundler/gems/statsd-instrument-50b2496ea65b/lib/statsd/instrument.rb:284:in measure' /artifacts/ruby/2.2.0/bundler/gems/statsd-instrument-50b2496ea65b/lib/statsd/instrument.rb:75:in block (2 levels) in statsd_measure' semian (0.4.1) lib/semian/mysql2.rb:82:in `block in connect'

Please let me know!!

The original report as published on HackerOne, by jamesclyde. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the staging instance was left publicly accessible with debug mode and verbose error reporting enabled, so database connection failures returned full stack traces.

Impact

An attacker could learn internal file paths and application source code structure, which may aid further attacks, though the text does not claim direct compromise.

What the attacker needed

None

The fix

The staging instance should require authentication and not expose verbose errors.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A staging server is a test copy of a website that is not meant to be public. This one was reachable by anyone and showed detailed error messages when something went wrong. Those messages included the names of internal files and folders, which helps an attacker learn how the site is built.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by jamesclyde

View all

8 more disclosed reports, best first.

More from Shopify

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.