CVE-2026-54256: Winter: Authenticated IDOR in backend FileUpload widget allows cross-user access to attachment metadata
Impact The backend FileUpload form widget trusted an attacker-controlled fileid POST parameter when resolving the attachment it operates on. The lookup (FileUpload::getFileRecord()) resolved the posted id against the global systemfiles table without verifying that the file belonged to the widget's own relation, parent record, or deferred-binding session.
Published Aug 20, 2026
Affected packages
winter/wn-backend-module
- Ecosystem
- Composer (PHP)
- Affected
- <= 1.2.12
- Fixed in
- 1.2.13
- Check
composer show winter/wn-backend-module
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Impact
The backend FileUpload form widget trusted an attacker-controlled file_id POST parameter when resolving the attachment it operates on. The lookup (FileUpload::getFileRecord()) resolved the posted id against the global system_files table without verifying that the file belonged to the widget's own relation, parent record, or deferred-binding session.
Any authenticated backend user who can reach a form containing a fileupload field — including the built-in My Account avatar field, which requires no specific backend permission — could therefore target a System\Models\File record belonging to another user or record and:
- modify its
titleanddescriptionviaonSaveAttachmentConfig, and - change its
sort_orderviaonSortAttachments(which passed posted ids straight tosetSortableOrder(), an unscopedUPDATE ... WHERE id = ?).
The same unscoped lookup is reached by onLoadAttachmentConfig, onSaveAttachmentConfig, and onRemoveAttachment. Because all attachments share the single System\Models\File model and system_files table, an attacker was not limited to other users' avatars — any attachment on any model could be referenced by id. Attachment ids are sequential integers and are easily enumerated.
The confirmed impact is unauthorized integrity modification of arbitrary attachment metadata and ordering.
CSRF tokens are still verified on all POST requests, so an attacker must be authenticated to the backend with a valid session. To exploit this issue an attacker needs a backend account with any level of access.
Patches
The FileUpload widget now scopes every file_id lookup to the widget's own relation, including any files bound through the current deferred-binding session, so a posted id can no longer reference an unrelated System\Models\File record:
getFileRecord()resolves the id throughgetRelationObject()->withDeferred($this->sessionKey)->find(...)rather than the global file model. This coversonLoadAttachmentConfig,onSaveAttachmentConfig, andonRemoveAttachment.onSortAttachments()intersects the posted ids with the ids that actually belong to the relation before callingsetSortableOrder().
This security issue has been fixed as of v1.2.13 (commit `9cb0ae5f9d837db141ab111c6a7de8eed9603d25`).
Workarounds
There is no supported workaround other than upgrading. If you cannot upgrade immediately, you may apply the fix manually in modules/backend/formwidgets/FileUpload.php:
- In
getFileRecord(), replace$this->getRelationModel()->find(post('file_id'))with$this->getRelationObject()->withDeferred($this->sessionKey)->find(post('file_id')). - In
onSortAttachments(), filter the postedsortOrderids to those returned by$this->getRelationObject()->withDeferred($this->sessionKey)->pluck($keyName)before callingsetSortableOrder().
Credited to r00tn0b0dy, baradika.
References
- https://github.com/wintercms/winter/security/advisories/GHSA-3277-h8g9-qj5f
- https://github.com/wintercms/winter/security/advisories/GHSA-qq9m-vfv4-pj5w
- https://github.com/wintercms/winter/commit/9cb0ae5f9d837db141ab111c6a7de8eed9603d25
- https://github.com/wintercms/winter/releases/tag/v1.2.13
- https://github.com/advisories/GHSA-3277-h8g9-qj5f
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesCVE-2026-63179
Winter: Local File Inclusion through @import directives in LESS compilation of backend customizable stylesheets and theme assets
medium4.9Aug 20, 2026CVE-2026-125338
Winter: Stored XSS through cached Brand Settings and Editor Settings custom styles
medium4.5Aug 20, 2026CVE-2026-125341
Winter: Stored XSS through Backend List widget image columns
low2.0Aug 20, 2026CVE-2026-125337
Winter: ImportExportController AJAX handlers bypass granular import/export permission gate
high8.3Aug 20, 2026CVE-2026-125340
Winter: Reflected XSS through the search query parameter in the backend Table widget
medium4.5Aug 20, 2026CVE-2026-126061
Winter: My Account preview exposes another backend user's profile by record ID
medium4.3Aug 20, 2026
