Skip to content

OpenFlights Unchecked Input for Loop Condition vulnerability in submit.php

Moderate
jpatokal published GHSA-2m59-c483-c8qj Aug 22, 2024

Package

composer jpatokal/openflights (Composer)

Affected versions

< 74539bd7ba067fbe9895977908dbf2ae6a885981

Patched versions

>= 74539bd7ba067fbe9895977908dbf2ae6a885981

Description

Summary

Unchecked Input for Loop Condition vulnerability in php/submit.php allows authenticated remote attackers to perform Denial-of-Service attacks via the multi parameter.

Details

The multi parameter is not checked and can be very large.

$multi = $_POST["multi"] ?? false;

if ($multi) {
for ($idx = 0; $idx < $multi; $idx++) {
$rows[$idx] = $idx + 1;
}

foreach ($rows as $idx) {

PoC

POST param=ADD&multi=100000 to https://openflights.org/php/submit.php (or several requests at the same time if a single request is not enough). Then observe degraded performance or even completely denied access to the service.

Impact

Authenticated remote attackers can degrade the performance of the server or even completely deny access from legitimate users.

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

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

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

CVE ID

No known CVE

Weaknesses

Credits