Fix guide · low · exposed_gemfile_lock

Ruby Gemfile.lock file exposed

What this rule means

Your /Gemfile.lock is reachable. It lists every Ruby gem in your app with exact versions. Useful for attackers cross-referencing against public CVEs.

Why it matters

Same shape as composer.lock but for Ruby: Gemfile.lock pins exact gem versions. Attackers parse it to find known CVEs applicable to your stack.

Common targets cross-referenced from a leaked Gemfile.lock:

Reconnaissance, not direct credential leak.

How to fix it

  1. Block Gemfile.lock at the web server. It belongs in source control, not in production HTTP.
  2. Run bundle audit as part of CI to catch known CVEs in your gems.
  3. For Rails apps, the default layout keeps Gemfile.lock outside the public root — confirm yours hasn't been broken by a custom deploy script.
  4. Keep gems patched. Subscribe to the Ruby security mailing list or monitor GitHub Advisory Database.

Did vibecheck flag this on your app?

If you reached this page from a vibecheck inspection report, the redacted match in your scan output is the exact string we found in your bundle. After applying the fix above, run the inspection again — the finding should clear.

Run another inspection