Skip to content

GHSA-w37f-pvvx-wcwm BIT-moodle-2022-30600 CVE-2022-30600

Incorrect Calculation in moodle

Critical Packagist
Severity
9.8 / 10
Critical · CVSS 3.1
Exploit chance (EPSS)
5.06%
Chance of exploitation in the next 30 days. Higher than 92.32% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-682 Incorrect Calculation
Fix
4.0.1
Upgrade moodle/moodle to this version or later

Description

A flaw was found in moodle where logic used to count failed login attempts could result in the account lockout threshold being bypassed.

Affected versions

Packagist

PackageVulnerableFixed in
moodle/moodle
>= 4.0, < 4.0.1
4.0.1
moodle/moodle
>= 3.9, < 3.9.14
3.9.14
moodle/moodle
>= 3.10, < 3.10.11
3.10.11
moodle/moodle
>= 3.11, < 3.11.7
3.11.7

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 → 4.0.1

composer
composer require moodle/moodle:^4.0.1

Severity breakdown

CVSS 3.1 9.8

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Weakness

CWE-682: Incorrect Calculation

The product performs a calculation that generates incorrect or unintended results that are later used in security-critical decisions or resource management.

How to prevent it
  • Implementation: Understand your programming language's underlying representation and how it interacts with numeric calculation. Pay close attention to byte size discrepancies, precision, signed/unsigned distinctions, truncation, conversion and casting between types, "not-a-number" calculations, and how your language handles numbers that are too large or too small for its underlying representation.
  • Implementation: Perform input validation on any numeric input by ensuring that it is within the expected range. Enforce that the input meets both the minimum and maximum requirements for the expected range.
  • Implementation: Use the appropriate type for the desired action. For example, in C/C++, only use unsigned types for values that could never be negative, such as height, width, or other numbers related to quantity.
  • Architecture and Design: Use languages, libraries, or frameworks that make it easier to handle numbers without unexpected consequences. Examples include safe integer handling packages such as SafeInt (C++) or IntegerLib (C or C++).
  • Architecture and Design: Use languages, libraries, or frameworks that make it easier to handle numbers without unexpected consequences. Examples include safe integer handling packages such as SafeInt (C++) or IntegerLib (C or C++).
  • Implementation: Examine compiler warnings closely and eliminate problems with potential security implications, such as signed / unsigned mismatch in memory operations, or use of uninitialized variables. Even if the weakness is rarely exploitable, a single failure may lead to the compromise of the entire system.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy 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
Is this in your code?

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