CVE-2013-4318
Description
CVE-2013-4318: File injection vulnerability in Ruby gem Features 0.3.0 allows local attackers to inject malicious HTML into /tmp/out.html via symlink or race condition.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
CVE-2013-4318: File injection vulnerability in Ruby gem Features 0.3.0 allows local attackers to inject malicious HTML into /tmp/out.html via symlink or race condition.
Vulnerability
Description CVE-2013-4318 is a file injection vulnerability in the Ruby gem Features version 0.3.0, a plain-text user stories parser for Rails and other frameworks. The gem writes an HTML output file to /tmp/out.html without verifying the file's integrity, allowing an attacker with local access to pre-create or symlink the file to inject arbitrary content [2].
Exploitation
An attacker with local access can create a malicious /tmp/out.html file (or a symlink pointing to an attacker-controlled location) before the gem writes its output. By repeatedly writing to the file, the attacker can inject arbitrary HTML/JavaScript. The gem then opens this file in a browser, leading to potential cross-site scripting (XSS) attacks [2][1].
Impact
Successful exploitation allows an attacker to inject arbitrary HTML and JavaScript, which could be executed in the context of the user opening the file, leading to information disclosure, session hijacking, or other client-side attacks. The vulnerability does not require authentication if the attacker already has local access to create files in /tmp [2][3].
Mitigation
As of the advisory, version 0.3.0 is vulnerable and no official patch has been released. The repository appears unmaintained. Users should avoid using the Features gem or implement proper file handling, such as using a secure temporary directory with random names and avoiding the use of fixed paths like /tmp/out.html [4].
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
featuresRubyGems | <= 0.3.0 | — |
Affected products
2- Features/Featuresv5Range: 0.3.0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- github.com/advisories/GHSA-42gq-h7xj-33r4ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2013-4318ghsaADVISORY
- www.openwall.com/lists/oss-security/2013/09/09/10ghsax_refsource_MISCWEB
- github.com/rubysec/ruby-advisory-db/blob/master/gems/features/CVE-2013-4318.ymlghsaWEB
- security-tracker.debian.org/tracker/CVE-2013-4318ghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.