Skip to content

Weak file permissions

Moderate
darksidemilk published GHSA-pcqm-h8cx-282c Jul 31, 2024

Package

No package listed

Affected versions

1.5.10

Patched versions

>=1.5.10.41

Description

Summary

The FOG application stores credentials in a permissive file that is accessible to all users on the server.

Details

The application stores plaintext service account credentials in the "/opt/fog/.fogsettings" file. This file is by default readable by all users on the host. By exploiting these credentials, a malicious user could create new accounts for the web application and much more.

PoC

Connect to the database and add a new user:

mysql -h localhost -u fogmaster -p fog
INSERT INTO users (uName, uPass, uCreateDate, uCreateBy, uType, uDisplay, uAllowAPI, uAPIToken) VALUES ('newuser', '<PASSWORD_HASH>', NOW(), 'fog', 0, '', 1, '<APIKEY>');

There will be a newly created user to access the web application.

Impact

Anyone with local access to the system can compromise the application by abusing weak file permissions.

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
Local
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

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:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L

CVE ID

CVE-2024-41954

Weaknesses

Credits