GHSA-g9m2-c2x5-fr2v CVE-2019-14879
Moodle does not revoke role capabilities correctly
- Severity
- 5.4 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 0.71%
- Chance of exploitation in the next 30 days. Higher than 53.52% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-273 Improper Check for Dropped Privileges
- Fix
3.7.3- Upgrade moodle/moodle to this version or later
Description
A vulnerability was found in Moodle versions 3.7.x before 3.7.3, 3.6.x before 3.6.7 and 3.5.x before 3.5.9. When a cohort role assignment was removed, the associated capabilities were not being revoked (where applicable).
Affected versions
Packagist
| Package | Vulnerable | Fixed in |
|---|---|---|
| moodle/moodle | >= 3.7.0, < 3.7.3 |
3.7.3 |
| moodle/moodle | >= 3.6.0, < 3.6.7 |
3.6.7 |
| moodle/moodle | >= 3.5.0, < 3.5.9 |
3.5.9 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
moodle/moodle Packagist → 3.7.3
- composer
composer require moodle/moodle:^3.7.3
Severity breakdown
CVSS 3.1 5.4
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Weakness
CWE-273: Improper Check for Dropped Privileges
The product attempts to drop privileges but does not check or incorrectly checks to see if the drop succeeded.
How to prevent it
- Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
- Implementation: Check the results of all functions that return a value and verify that the value is expected.
- Implementation: In Windows, make sure that the process token has the SeImpersonatePrivilege(Microsoft Server 2003). Code that relies on impersonation for security must ensure that the impersonation succeeded, i.e., that a proper privilege demotion happened.
References
Advisories
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-cg8j-5cr2-568q Moodle TeX formula editor is vulnerable to DoS through lack of execution time limits | Medium | Also affects moodle/moodle |
| GHSA-ggxq-2mg9-8966 Moodle has a Remote Code Execution risk via file restore | High | Also affects moodle/moodle |
| GHSA-8jrv-wx83-w3xj Moodle Inserts Sensitive Information Into Sent Data | Medium | Also affects moodle/moodle |
| GHSA-hcm6-q6pc-xfhm Moodle has an authorization logic flaw | Critical | Also affects moodle/moodle |
| GHSA-vwhw-vp9v-q9c9 Moodle vulnerable to Cross-site Scripting | Medium | Also affects moodle/moodle |
| GHSA-5cx4-w4fh-fr57 Moodle Affected by Improper Restriction of Excessive Authentication Attempts | High | Also affects moodle/moodle |
| GHSA-qv78-6gpp-hm68 Moodle Open Redirect vulnerability | Medium | Also affects moodle/moodle |
| GHSA-qfh6-h7j6-fvjv Moodle formula injection vulnerability | High | Also affects moodle/moodle |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor