CVE-2018-11627 is a medium-severity (CVSS 6.1) Cross-site Scripting (XSS) vulnerability in sinatra. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for sinatra — see the affected versions and patch details below.
Sinatra Cross-site Scripting vulnerability
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
sinatraReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.
Description
Sinatra before 2.0.2 has XSS via the 400 Bad Request page that occurs upon a params parser exception.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 💎RubyGems | sinatra | ≥ 2.0.0&&< 2.0.2 | 2.0.2bundle update sinatra --conservative |
Affected Products
cloudformsredhatsinatrasinatrarbResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for sinatra, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update sinatra to 2.0.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2018-11627 is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
| Product | Fixed in | Advisory |
|---|---|---|
| CloudForms Management Engine 5.10 | ansible-runner-0:1.1.2-2.el7ar | RHSA-2019:0212 |
| CloudForms Management Engine 5.9 | cfme-0:5.9.8.1-1.el7cf | RHSA-2019:0315 |
Frequently Asked Questions
Is CVE-2018-11627 in your dependencies?
Find it across RubyGems, including transitive dependencies.