Skip to content

Evidence Files Accessible without authentication

High
chrismaddalena published GHSA-p796-9863-mwx8 Jan 25, 2024

Package

nginx.conf (Nginx)

Affected versions

<=4.0.5

Patched versions

4.0.6

Description

Summary

The files uploaded as evidence are exposed without authentication due to an issue with the Nginx web server configuration present in production environments. The nginx.conf file contains a location entry for /media that maps to Django's media storage.

Impact

Nginx does not enforce authentication, so anyone with network access to the Ghostwriter instance can access any evidence file for which they can determine the name and associated report ID number.

For example, someone who knows or can guess that a report with the ID 338 has an evidence file named 20240125-production-data.png can assemble a URL like this and view the evidence file:

https[:]//ghostwriter.local/media/evidence/338/20240125-production-data.png

Patches

Ghostwriter v4.0.6 resolved this issue by removing /media from the nginx.conf and implementing dedicated views and routes for all media files (e.g., evidence files, user avatars, and report templates). These new views require authentication and apply Ghostwriter's Role-Based Access Controls.

In v4.0.6+, evidence links look like this example URL: https[:]//ghostwriter.local/reporting/evidence/download/889

Reproduction Steps

  1. Login as a user with access to a report on Ghostwriter =<v4.0.5.
  2. Upload an image as an evidence file to a finding under that report.
  3. On the evidence details page, copy the URL of the file by right-clicking the image and clicking Copy Image Link (or similar for the browser used).
  4. Logout, open a private browsing window, or use a tool like curl and try to load the copied URL.

Severity

High

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
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

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

CVE ID

No known CVE

Weaknesses

No CWEs

Credits