CVE-2012-6099: Moodle/moodle Moodle Arbitrary File Read Vulnerability
MODERATECVE-2012-6099 is a MODERATE moodle arbitrary file read vulnerability (CWE-20: Improper Input Validation) affecting Moodle/moodle libraries in the Packagist ecosystem. The issue involves moodle arbitrary file read via backup functionality. Remediation is available by upgrading affected packages to version 2.4.1, 2.3.4, 2.2.7, 2.1.10.
CVE-2012-6099 at a Glance
How to Fix CVE-2012-6099
To remediate this vulnerability, upgrade all affected Moodle/moodle dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade moodle/moodle to 2.4.1
Upgrade moodle/moodle to 2.3.4
Upgrade moodle/moodle to 2.2.7
Upgrade moodle/moodle to 2.1.10
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for moodle/moodle
How to Check if You Are Affected
To determine whether your application is affected by CVE-2012-6099, inspect your project dependencies for Moodle/moodle:
inspect dependencies for moodle/moodle
Analyze the terminal output to locate any version of Moodle/moodle in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.4.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Moodle/moodle, 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-2012-6099 Affected Moodle/moodle Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
moodle/moodle
|
Packagist |
≥ 2.4
< 2.4.1
All 1 versions
2.4
|
2.4.1
|
|
moodle/moodle
|
Packagist |
≥ 2.3
< 2.3.4
|
2.3.4
|
|
moodle/moodle
|
Packagist |
≥ 2.2
< 2.2.7
|
2.2.7
|
|
moodle/moodle
|
Packagist |
≥ 2.1
< 2.1.10
|
2.1.10
|
References
Frequently Asked Questions
What is CVE-2012-6099?
Which Moodle/moodle versions are affected?
What version fixes CVE-2012-6099?
Is moodle/moodle affected?
What CWE is associated with CVE-2012-6099?
How can I check Packagist dependencies for CVE-2012-6099?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cr78-rphw-w73p",
"modified" : "2023-12-29T21:00:53Z",
"published" : "2022-05-13T01:12:55Z",
"aliases" : [ "CVE-2012-6099" ],
"summary" : "Moodle Arbitrary File Read via Backup Functionality",
"details" : "The moodle1 backup converter in `backup/converter/moodle1/lib.php` in Moodle 2.1.x before 2.1.10, 2.2.x before 2.2.7, 2.3.x before 2.3.4, and 2.4.x before 2.4.1 does not properly validate pathnames, which allows remote authenticated users to read arbitrary files by leveraging the backup-restoration feature.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "moodle/moodle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.4"
}, {
"fixed" : "2.4.1"
} ]
} ],
"versions" : [ "2.4" ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "moodle/moodle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.3"
}, {
"fixed" : "2.3.4"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.3.3"
}
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "moodle/moodle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.2"
}, {
"fixed" : "2.2.7"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.2.6"
}
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "moodle/moodle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.1"
}, {
"fixed" : "2.1.10"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.1.9"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2012-6099"
}, {
"type" : "WEB",
"url" : "https://github.com/moodle/moodle/commit/0ab681d3e7bed2a37430387f9da8504c0b077d10"
}, {
"type" : "WEB",
"url" : "https://github.com/moodle/moodle/commit/7b66137f7bcc84fb5eb07f58fb658b21bf37cc44"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/moodle/moodle"
}, {
"type" : "WEB",
"url" : "https://moodle.org/mod/forum/discuss.php?d=220160"
}, {
"type" : "WEB",
"url" : "http://git.moodle.org/gw?p=moodle.git&a=search&h=HEAD&st=commit&s=MDL-36977"
}, {
"type" : "WEB",
"url" : "http://openwall.com/lists/oss-security/2013/01/21/1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-12-29T21:00:53Z",
"nvd_published_at" : "2013-01-27T22:55:00Z"
}
}