Advisory

GHSA-q7f2-rv22-2xgr

Details, part 2 of 2. The advisory

Details

This is a design-level omission rather than a bypassable control — there is simply no metadata handling logic present.

---

Impact Assessment

Direct Impacts

| Impact | Description | Severity |
|---|---|---|
| Geolocation Disclosure | GPS coordinates in uploaded photos can reveal home addresses, office locations, client sites, travel patterns of employees | High |
| PII Leakage | Author names, comments, device owner names embedded in metadata expose personal identity | High |
| Device Fingerprinting | Camera make/model, serial numbers, and software versions enable tracking and targeting of specific individuals or devices | Medium |
| Behavioral Profiling | Timestamps and sequential GPS data across multiple uploads can reconstruct an individual's movements and schedule | High |
| Embedded Thumbnail Leakage | Thumbnails may preserve the original uncropped image, potentially exposing content the user intentionally cropped out (documented in prior CVEs) | Medium–High |

Contextual / Escalated Impacts

  • Regulatory Exposure: GPS coordinates and author names constitute personal data under GDPR (Art. 4(1)), CCPA, and similar frameworks. Failure to strip this data from shared/downloadable resources may constitute a data protection violation for organizations using Fectura Scripts.
  • Insider Threat Amplification: A malicious insider (employee, contractor) with Library download access can silently harvest geolocation and identity data of colleagues without any logging or indication to the victim.
  • Physical Security Risk: In sectors where employee physical safety is paramount (e.g., legal, law enforcement, journalism, NGOs, domestic violence support), leaking home GPS coordinates through an ERP system represents a direct physical safety threat.
  • Supply Chain Risk: If the Library is shared with external partners/vendors, the exposure surface extends beyond the organization.

Why CVSS 6.5 Understates the Risk

The CVSS base score of 6.5 reflects the mechanical characteristics of the vulnerability (network-accessible, low complexity, authenticated). However, the contextual severity is higher because:

  1. Users have no expectation that uploading an image to an ERP system will broadcast their home coordinates.
  2. The attack is completely passive — the attacker simply downloads a file; no exploitation toolkit or special skills are required.
  3. The leaked data (GPS, PII) is irrevocable — once downloaded, the victim cannot "un-leak" their location.
  4. The vulnerability affects every image ever uploaded to the Library, creating a retroactive exposure of historical data.

Recommended effective severity: HIGH for any deployment handling real employee/client data.

---

Recommended Remediation

Immediate (Short-Term)

| Priority | Action |
|---|---|
| P0 | Implement server-side EXIF/metadata stripping on all image uploads in the Library module before storage. |
| P0 | Retroactively strip metadata from all existing images already stored in the Library. |
| P1 | Extend metadata stripping to all other upload endpoints across the application (email attachments, profile photos, product images, etc.). |

Implementation Guidance (by Language/Stack)

PHP (likely stack for Fectura Scripts):

// Using GD (built-in, no dependencies)
function stripMetadata($sourcePath, $destPath) {
    $image = imagecreatefromjpeg($sourcePath);
    imagejpeg($image, $destPath, 95); // Re-encodes, discarding all EXIF
    imagedestroy($image);
}

// Using Imagick (if available)
$img = new Imagick($sourcePath);
$img->stripImage(); // Removes all EXIF, IPTC, XMP profiles
$img->writeImage($destPath);

Python:

from PIL import Image
img = Image.open("uploaded.jpg")
data = list(img.getdata())
clean = Image.new(img.mode, img.size)
clean.putdata(data)
clean.save("clean.jpg")

Command-line (for retroactive cleanup):

# Strip all metadata from all JPEGs in the library storage directory
exiftool -all= -overwrite_original /path/to/library/uploads/*.jpg

Long-Term (Architectural)

| Priority | Action |
|---|---|
| P1 | Establish a centralized file upload processing pipeline that all modules route through, ensuring consistent sanitization. |
| P1 | Add Content Security Policy and Content-Disposition: attachment headers on all file downloads to reduce inline rendering risks. |
| P2 | Implement a configurable metadata policy (e.g., allow admins to choose between full strip, preserve orientation only, or preserve color profile). |
| P2 | Add file type validation (magic byte checking, not just extension) to the upload pipeline. |
| P3 | Consider adding a user-facing warning at upload time: "Note: Image metadata will be stripped for privacy." |

---

9. References

| Resource | URL |
|---|---|
| CWE-200: Exposure of Sensitive Information | https://cwe.mitre.org/data/definitions/200.html |
| CWE-212: Improper Removal of Sensitive Information Before Storage or Transfer | https://cwe.mitre.org/data/definitions/212.html |
| NIST NVD CVSS v3.1 Calculator | https://www.first.org/cvss/calculator/3.1 |
| GDPR Art. 4(1) — Definition of Personal Data | https://gdpr-info.eu/art-4-gdpr/ |
| ExifTool by Phil Harvey | https://exiftool.org/ |
| Related CVE | https://nvd.nist.gov/vuln/detail/CVE-2023-29850 |
---

11. Conclusion

The absence of image metadata sanitization in Fectura Scripts' Library module is a clear, easily exploitable, and high-impact information disclosure vulnerability. It requires no technical skill to exploit (just a file download and a free tool), it leaks data that users never intended to share (home GPS coordinates, personal identity), and it affects every image ever uploaded to the platform retroactively.

While the CVSS base score of 6.5 categorizes this as "Medium," the real-world privacy consequences — particularly under GDPR and in contexts where physical safety is relevant — warrant treating this with High urgency. The fix is straightforward, well-documented, and should be implemented immediately across all upload endpoints.

<img width="1920" height="1020" alt="image" src="https://github.com/user-attachments/assets/80cbdd80-fc80-45f2-b125-e0557e94ac40" />

<img width="1920" height="1020" alt="image" src="https://github.com/user-attachments/assets/53fd80bb-cd41-48d6-a9b8-3129f307bce6" />

Sources & licences