Skip to content

chore(deps): update dependency rack to v2.2.22 [security]#2652

Merged
renovate[bot] merged 1 commit intomainfrom
renovate/rubygems-rack-vulnerability
Feb 17, 2026
Merged

chore(deps): update dependency rack to v2.2.22 [security]#2652
renovate[bot] merged 1 commit intomainfrom
renovate/rubygems-rack-vulnerability

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Feb 17, 2026

This PR contains the following updates:

Package Change Age Confidence
rack (changelog) 2.2.212.2.22 age confidence

GitHub Vulnerability Alerts

CVE-2026-22860

Summary

Rack::Directory’s path check used a string prefix match on the expanded path. A request like /../root_example/ can escape the configured root if the target path starts with the root string, allowing directory listing outside the intended root.

Details

In directory.rb, File.expand_path(File.join(root, path_info)).start_with?(root) does not enforce a path boundary. If the server root is /var/www/root, a path like /var/www/root_backup passes the check because it shares the same prefix, so Rack::Directory will list that directory also.

Impact

Information disclosure via directory listing outside the configured root when Rack::Directory is exposed to untrusted clients and a directory shares the root prefix (e.g., public2, www_backup).

Mitigation

  • Update to a patched version of Rack that correctly checks the root prefix.
  • Don't name directories with the same prefix as one which is exposed via Rack::Directory.

CVE-2026-25500

Summary

Rack::Directory generates an HTML directory index where each file entry is rendered as a clickable link. If a file exists on disk whose basename begins with the javascript: scheme (e.g. javascript:alert(1)), the generated index includes an anchor whose href attribute is exactly javascript:alert(1). Clicking this entry executes arbitrary JavaScript in the context of the hosting application.

This results in a client-side XSS condition in directory listings generated by Rack::Directory.

Details

Rack::Directory renders directory entries using an HTML row template similar to:

<a href='%s'>%s</a>

The %s placeholder is populated directly with the file’s basename. If the basename begins with javascript:, the resulting HTML contains an executable JavaScript URL:

<a href='javascript:alert(1)'>javascript:alert(1)</a>

Because the value is inserted directly into the href attribute without scheme validation or normalization, browsers interpret it as a JavaScript URI. When a user clicks the link, the JavaScript executes in the origin of the Rack application.

Impact

If Rack::Directory is used to expose filesystem contents over HTTP, an attacker who can create or upload files within that directory may introduce a malicious filename beginning with javascript:.

When a user visits the directory listing and clicks the entry, arbitrary JavaScript executes in the application's origin. Exploitation requires user interaction (clicking the malicious entry).

Mitigation

  • Update to a patched version of Rack in which Rack::Directory prefixes generated anchors with a relative path indicator (e.g. ./filename).
  • Avoid exposing user-controlled directories via Rack::Directory.
  • Apply a strict Content Security Policy (CSP) to reduce impact of potential client-side execution issues.
  • Where feasible, restrict or sanitize uploaded filenames to disallow dangerous URI scheme prefixes.

Release Notes

rack/rack (rack)

v2.2.22

Compare Source


Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from a team as a code owner February 17, 2026 19:03
@renovate renovate bot added the renovate Automated dependency updates label Feb 17, 2026
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedrack@​2.2.21 ⏵ 2.2.2292100 +18100100100

View full report

@renovate renovate bot merged commit 117e015 into main Feb 17, 2026
2 checks passed
@renovate renovate bot deleted the renovate/rubygems-rack-vulnerability branch February 17, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

renovate Automated dependency updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants