# CVE-2013-4940: Yahoo YUI Cross-site Scripting in io.swf

Source: https://junglewise.ai/threats/cve-2013-4940-yahoo-yui-cross-site-scripting-in-io-swf  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-05-13. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2013-4940 · Severity: medium · CVSS 4 · Published 2022-05-13

Yahoo YUI is a popular JavaScript framework used in web applications like Moodle to handle network I/O operations. This vulnerability allows attackers to inject malicious JavaScript code into web pages through a crafted URL, which could lead to theft of user credentials, session hijacking, or distribution of malware to end users.

Technologies: [Moodle](https://junglewise.ai/threats/technologies/moodle). Vendors: [Moodle](https://junglewise.ai/threats/vendors/moodle).

## Quick answers

**Is CVE-2013-4940 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2013-4940 being exploited in the wild.

**How severe is CVE-2013-4940?** Medium severity, with a CVSS score of 4, published 13 May 2022.

**Which products and versions are affected?** Moodle through 2.1.10; 2.2.0 through 2.2.10; 2.3.0 through 2.3.7; 2.4.0-rc1 through 2.4.4; 2.5.0-beta through 2.5.0.

**Is there a fix for CVE-2013-4940?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2013-4940 attacked?** It is attacked over the network.

**Am I affected by CVE-2013-4940?** Check whether you run Moodle at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

This is a cross-site scripting (XSS) vulnerability (CWE-79) in the io.swf Flash component of Yahoo YUI's IO Utility. The vulnerability exists in how the component processes URL parameters, failing to properly sanitize user-supplied input. An attacker can craft a malicious URL containing arbitrary JavaScript that gets reflected in the page without proper encoding. The attack requires user interaction (clicking a malicious link) but no authentication. When an unpatched YUI version is deployed in applications like Moodle, the XSS payload executes in the victim's browser with the privileges of the hosting page. Patches are available: YUI 3.10.11 or later, or Moodle 2.2.11+, 2.3.8+, 2.4.5+, 2.5.1+.

## Affected products

- Yahoo YUI 3.0.0 through 3.10.10, 3.10.12
- Moodle Moodle through 2.1.10; 2.2.0 through 2.2.10; 2.3.0 through 2.3.7; 2.4.0-rc1 through 2.4.4; 2.5.0-beta through 2.5.0

## Identifiers

- CVE-2013-4940
- GHSA-x5hj-47vv-53p8

## Timeline

- 2013-07-29: disclosed
- 2022-05-13: advisory: GitHub security advisory published

## References

- [https://moodle.org/mod/forum/discuss.php?d=232496](https://moodle.org/mod/forum/discuss.php?d=232496)

## Related threats

- [Moodle insufficient access control in H5P content files](https://junglewise.ai/threats/cve-2026-123655-a-flaw-was-found-in-moodle-insufficient-access-control-checks-on)
- [Moodle missing capability check in core_grades_get_gradeitems](https://junglewise.ai/threats/cve-2026-119556-moodle-4-2-0-through-4-5-15-5-0-0-through-5-0-11-5-1-0-through-5)
- [Moodle core_grades_get_feedback information disclosure](https://junglewise.ai/threats/cve-2026-119555-moodle-4-2-0-through-4-5-15-5-0-0-through-5-0-11-5-1-0-through-5)
- [Moodle SQL injection in External database enrolment plugin](https://junglewise.ai/threats/cve-2026-119554-moodle-5-3-0-5-2-0-through-5-2-4-5-1-0-through-5-1-8-5-0-0)
- [Moodle path traversal in Blackboard question import](https://junglewise.ai/threats/cve-2026-119553-moodle-5-3-0-5-2-0-through-5-2-4-5-1-0-through-5-1-8-5-0-0)
