You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Security] Unauthenticated download of unpublished and expired documents via /unduhan/form-dokumen/unduh/{id} #1813
The public unduhan (downloads) route group exposes GET /unduhan/form-dokumen/unduh/{id} without authentication, and the downloadDokumen method in app/Http/Controllers/FrontEnd/DownloadController.php serves the file for the given ID without verifying that the document is published (is_published) or that it has not expired (expired_at):
The public downloads list (getDataDokumen) filters correctly, so these documents are hidden from the list — but the download endpoint does not apply the same filter. Because document IDs are sequential, any unauthenticated user can iterate IDs and download internal/draft documents (is_published = 0) and expired documents (expired_at in the past).
Affected versions
OpenDK v2610.0.0 and prior versions. Verified still present in v2611.0.0 and on the main branch (HEAD 20147afc, 14 November 2026).
Steps to reproduce (local lab, OpenDK v2610.0.0)
Create a document row with is_published = 0 and expired_at set in the past. Confirm it does not appear on the public downloads list.
Send an unauthenticated request: GET /unduhan/form-dokumen/unduh/1
Observed: HTTP 200 with the full file contents returned.
Impact
Information disclosure of unpublished (draft) and expired documents, which may contain internal or time-sensitive material.
Suggested fix
In downloadDokumen, apply the same visibility filter the public list uses before serving the file — only serve the document when is_published is true and (expired_at is null or in the future). Requests for hidden documents should return 404 so the endpoint does not confirm whether a given ID exists. The sibling endpoints in the same controller (downloadProsedur, downloadRegulasi) should be reviewed for the same pattern.
CVE
CVE-2026-128616 has been assigned by MITRE for this issue. I am holding public disclosure until a fixed release ships — please let me know once the fix is available so the writeup can be published in coordination.
Reported by Wisnandra Galang Revolusi Pambayun (Galang10).
Activity
Refactor: Pertahankan type hint FormDokumen pada downloadDokumen (#1813)
Fix: Batasi unduh dokumen hanya untuk dokumen terbit dan belum kedalu…
analisopendesa commentedon Nov 25, 2026
Sudah diperbaiki di PR #1814