Ruby is shipping a vulnerable jQuery
Ruby's RDoc Darkfish template bundles an outdated jQuery version (1.6.4) that is affected by known CVEs. An attacker could exploit these vulnerabilities if a site accidentally includes the generated HTML and uses the bundled jQuery.
Originally disclosed on HackerOne
- Triaged in 4 days
- Fixed in 5 months
- Disclosed after 6 months
No this isn't a report about the website!
Ruby ships Darkfish as part of RDoc
https://github.com/ruby/ruby/tree/HEAD/lib/rdoc/generator/template/darkfish https://github.com/ruby/rdoc/tree/master/lib/rdoc/generator/template/darkfish https://github.com/ged/darkfish
Darkfish includes jQuery v1.6.4, which is vulnerable to multiple CVEs, for example
https://nvd.nist.gov/vuln/detail/CVE-2012-6708 https://nvd.nist.gov/vuln/detail/CVE-2015-9251
Now I'm not sure how applicable these CVEs are to the generated HTML, or how likely it is someone would use the jQuery from this file in the rest of their site accidentally by including generated HTML, but I do think it's a problem to be shipping a version of jQuery that is getting towards a decade old.
Maybe Darkfish should update? But who's going to do that work?
Maybe we shouldn't ship Darkfish if nobody can update it?
What do people think should be done? I ship my own implementation of Ruby and I'm not happy with shipping this old version so may have to remove Darkfish myself.
Impact
Low. Possibly a risk that someone includes RDoc generated HTML on their site and accidentally uses this jQuery for the rest of their site and makes themselves vulnerable to the CVEs.
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
Impact
Low; there is a possible risk that someone includes RDoc generated HTML on their site and accidentally uses this jQuery, making themselves vulnerable to the CVEs.
What the attacker needed
Victim includes generated HTML on their site
The fix
Darkfish should be updated to a newer jQuery version, or removed if it cannot be maintained.
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.
Ruby's documentation generator includes an old copy of jQuery, a JavaScript library. That old version has known security bugs, so if someone copies the generated HTML into their own site, they might accidentally make their site vulnerable.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.