CVE-2013-4941: Yui Cross-Site Scripting Vulnerability
MODERATECVE-2013-4941 is a MODERATE cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Yui libraries in the npm ecosystem. The issue involves yui cross-site scripting (xss) vulnerability. Remediation is available by upgrading affected packages to version 2.2.11, 2.3.8, 2.4.5, 2.5.1.
CVE-2013-4941 at a Glance
How to Fix CVE-2013-4941
To remediate this vulnerability, upgrade all affected Yui dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install yui@Latest secure release
Upgrade moodle/moodle to 2.2.11
Upgrade moodle/moodle to 2.3.8
Upgrade moodle/moodle to 2.4.5
Upgrade moodle/moodle to 2.5.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls yui
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2013-4941, inspect your project dependencies using npm:
npm ls yui
Analyze the terminal output to locate any version of Yui in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.11), your application is affected.
Note: The npm ls yui command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Yui, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2013-4941 Affected Yui Versions
5 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
yui
|
npm |
≥ 3.2.0
≤ 3.9.1
|
|
|
moodle/moodle
|
Packagist |
< 2.2.11
|
2.2.11
|
|
moodle/moodle
|
Packagist |
≥ 2.3.0
< 2.3.8
|
2.3.8
|
|
moodle/moodle
|
Packagist |
≥ 2.4.0-rc1
< 2.4.5
|
2.4.5
|
|
moodle/moodle
|
Packagist |
≥ 2.5.0-beta
< 2.5.1
|
2.5.1
|
References
Frequently Asked Questions
What is CVE-2013-4941?
Which Yui versions are affected?
What version fixes CVE-2013-4941?
Is yui affected?
Is moodle/moodle affected?
What CWE is associated with CVE-2013-4941?
How can I check npm dependencies for CVE-2013-4941?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-64r3-582j-frqm",
"modified" : "2025-04-12T03:25:18Z",
"published" : "2022-05-13T01:12:54Z",
"aliases" : [ "CVE-2013-4941" ],
"summary" : "YUI Cross-site Scripting (XSS) vulnerability",
"details" : "Cross-site scripting (XSS) vulnerability in uploader.swf in the Uploader component in Yahoo! YUI 3.2.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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "yui"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.2.0"
}, {
"last_affected" : "3.9.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "moodle/moodle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.2.11"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "moodle/moodle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.3.0"
}, {
"fixed" : "2.3.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "moodle/moodle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.4.0-rc1"
}, {
"fixed" : "2.4.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "moodle/moodle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.5.0-beta"
}, {
"fixed" : "2.5.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-4941"
}, {
"type" : "WEB",
"url" : "https://moodle.org/mod/forum/discuss.php?d=232496"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20130909203912/http://yuilibrary.com/support/20130515-vulnerability"
}, {
"type" : "WEB",
"url" : "http://git.moodle.org/gw?p=moodle.git&a=search&h=HEAD&st=commit&s=MDL-39678"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-04-12T03:25:17Z",
"nvd_published_at" : "2013-07-29T13:59:00Z"
}
}