CVE-2026-28679
Directory Traversal in Home-Gallery Allows Sensitive File Download
Publication date: 2026-03-06
Last updated on: 2026-03-10
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| home-gallery | homegallery | to 1.21.0 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-22 | The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2026-28679 is a Path Traversal vulnerability in HomeGallery version 1.20.0, a web-based photo and video gallery application. The vulnerability occurs because the application does not properly verify whether a requested file for download is located within the designated media source directory. This allows an attacker to craft specially crafted HTTP GET requests with path traversal sequences (like ../../../../../etc/passwd) to access and download sensitive system files outside the media directory without any authentication.
The issue was fixed in version 1.21.0 by adding proper validation of file paths to restrict downloads only to files within the media source directory.
How can this vulnerability impact me? :
This vulnerability can have a significant impact by allowing remote attackers to read arbitrary sensitive files on the host system without any authentication or user interaction.
- Unauthorized disclosure of sensitive system files, such as password files or configuration files.
- Potential exposure of confidential information that could be used for further attacks.
- Compromise of system confidentiality, as indicated by the high confidentiality impact and a CVSS score of 8.6.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by attempting to exploit the path traversal flaw on the vulnerable HomeGallery instance. Specifically, you can enumerate the media source names via the API endpoint and then send crafted HTTP GET requests with path traversal sequences to check if files outside the media directory are accessible.
- Send a GET request to `/api/sources` to list available media sources.
- Send a GET request to `/api/sources/<source>/../../../../../etc/passwd` replacing `<source>` with the enumerated media source name.
If the server responds with the contents of sensitive files like `/etc/passwd`, the system is vulnerable.
Example command using curl to test the vulnerability (replace <source> with actual media source name):
- curl -v http://<host>/api/sources
- curl -v http://<host>/api/sources/<source>/../../../../../etc/passwd
What immediate steps should I take to mitigate this vulnerability?
[{'type': 'paragraph', 'content': 'The immediate mitigation step is to upgrade HomeGallery to version 1.21.0 or later, where the vulnerability has been patched by properly validating file paths to restrict access within the media source directory.'}, {'type': 'paragraph', 'content': 'If upgrading immediately is not possible, consider disabling the "downloadable: true" option in the gallery.config.yml configuration file to prevent file downloads until the patch can be applied.'}, {'type': 'paragraph', 'content': 'Additionally, restrict network access to the HomeGallery service to trusted users only, and monitor for suspicious requests targeting the `/api/sources/:source/:path` endpoint.'}] [2]