<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://vulnerability.circl.lu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-09-30T18:14:10.100492+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@circl.lu</email>
  </author>
  <link href="https://vulnerability.circl.lu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/ghsa-whrj-4476-wvmp</id>
    <title>GHSA-whrj-4476-wvmp — Stored XSS in Rack::Directory via javascript: filenames rendered into anchor href</title>
    <updated>2026-09-30T18:14:10.488864+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> RubyGems: rack</p>
<p>## Summary</p>
<p>`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.</p>
<p>This results in a client-side XSS condition in directory listings generated by `Rack::Directory`.</p>
<p>## Details</p>
<p>`Rack::Directory` renders directory entries using an HTML row template similar to:</p>
<p>```html
&lt;a href='%s'&gt;%s&lt;/a&gt;
```</p>
<p>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:</p>
<p>```html
&lt;a href='javascript:alert(1)'&gt;javascript:alert(1)&lt;/a&gt;
```</p>
<p>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.</p>
<p>## Impact</p>
<p>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:`.</p>
<p>When a user visits the directory listing and clicks the entry, arbitrary JavaScript executes in the application's origin. Exploitation requires user interaction…</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/ghsa-whrj-4476-wvmp"/>
  </entry>
</feed>
