CVE-2023-38491Kirby vulnerable to Cross-site scripting (XSS) from MIME type auto-detection of uploaded files
- 5.7MediumCVSS base score
- 0.62%Exploitation in 30 daysEPSS · top 50% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
Description
Kirby is a content management system. A vulnerability in versions prior to 3.5.8.3, 3.6.6.3, 3.7.5.2, 3.8.4.1, and 3.9.6 affects all Kirby sites that might have potential attackers in the group of authenticated Panel users or that allow external visitors to upload an arbitrary file to the content folder. Kirby sites are not affected if they don't allow file uploads for untrusted users or visitors or if the file extensions of uploaded files are limited to a fixed safe list. The attack requires user interaction by another user or visitor and cannot be automated. An editor with write access to the Kirby Panel could upload a file with an unknown file extension like `.xyz` that contains HTML code including harmful content like `<script>` tags. The direct link to that file could be sent to other users or visitors of the site. If the victim opened that link in a browser where they are logged in to Kirby and the file had not been opened by anyone since the upload, Kirby would not be able to send the correct MIME content type, instead falling back to `text/html`. The browser would then run the script, which could for example trigger requests to Kirby's API with the permissions of the victim. The issue was caused by the underlying `Kirby\Http\Response::file()` method, which didn't have an explicit fallback if the MIME type could not be determined from the file extension. If you use this method in site or plugin code, these uses may be affected by the same vulnerability. The problem has been patched in Kirby 3.5.8.3, 3.6.6.3, 3.7.5.2, 3.8.4.1, and 3.9.6. In all of the mentioned releases, the maintainers have fixed the affected method to use a fallback MIME type of `text/plain` and set the `X-Content-Type-Options: nosniff` header if the MIME type of the file is unknown.
Timeline
ID reserved
By GitHub_M
- 9 days later
· 9 days later
Published
- 15 months later
· 15 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium5.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N |
| NVDNVD · Modified | 3.1 | Medium5.4 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
- EPSS (exploitation in 30 days)
- 0.62% · top 50% of all CVEs (16 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 5.7.
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Packagistgetkirby/cmsGHSA-8fv7-wq38-f5c9 (opens in a new tab)
References
References7
- https://github.com/getkirby/kirby/security/advisories/GHSA-8fv7-wq38-f5c9 (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/getkirby/kirby/commit/2f06ba1c026bc91cb0702bc16b7d505642536d15 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/getkirby/kirby/releases/tag/3.5.8.3 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/getkirby/kirby/releases/tag/3.6.6.3 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/getkirby/kirby/releases/tag/3.7.5.2 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/getkirby/kirby/releases/tag/3.8.4.1 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/getkirby/kirby/releases/tag/3.9.6 (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2023-2004 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-8fv7-wq38-f5c9 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2023-38491)Record last updated .