CVE-2013-4942 — yui
CVE-2013-4942 is a Cross-site Scripting (XSS) vulnerability in yui. A fix is available for yui — see the affected versions and patch details below.
YUI Cross-site Scripting (XSS) vulnerability
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
yuinpmDescription
Cross-site scripting (XSS) vulnerability in flashuploader.swf in the Uploader component in Yahoo! YUI 3.5.0 through 3.9.1, as used in Moodle through 2.1.10, 2.2.x before 2.2.11, 2.3.x before 2.3.8, 2.4.x before 2.4.5, 2.5.x before 2.5.1, and other products, allows remote attackers to inject arbitrary web script or HTML via a crafted string in a URL.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | yui | ≥ 3.2.0 | No fix |
| 🐘Packagist | moodle/moodle | all versions | 2.2.11composer require moodle/moodle:^2.2.11 |
| 🐘Packagist | moodle/moodle | ≥ 2.3.0&&< 2.3.8 | 2.3.8composer require moodle/moodle:^2.3.8 |
| 🐘Packagist | moodle/moodle | ≥ 2.4.0-rc1&&< 2.4.5 | 2.4.5composer require moodle/moodle:^2.4.5 |
| 🐘Packagist | moodle/moodle | ≥ 2.5.0-beta&&< 2.5.1 | 2.5.1composer require moodle/moodle:^2.5.1 |
Affected Products
moodlemoodleyuiyahooDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for yui, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
A fix is available for CVE-2013-4942; check the affected-versions list above or the advisory for the patched release of yui, then make sure no transitive dependency still pins the vulnerable range.
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.
Frequently Asked Questions
Is CVE-2013-4942 in your dependencies?
Find it across npm, Packagist, including transitive dependencies.