{"id":"CVE-2023-38491","aliases":["EUVD-2023-2004","GHSA-8fv7-wq38-f5c9"],"status":"published","title":"Kirby vulnerable to Cross-site scripting (XSS) from MIME type auto-detection of uploaded files","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.\n\nAn 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 `\u003cscript\u003e` 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.\n\nThe 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.\n\nThe 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.","severity":{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.0062,"percentile":0.50056,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2023-07-27T15:30:49Z","modified":"2026-10-28T02:31:10Z","fixes":[{"ecosystem":"Packagist","package":"getkirby/cms","fixed_in":["3.5.8.3","3.6.6.3","3.7.5.2","3.8.4.1","3.9.6"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Packagist","package":"getkirby/cms","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.5.8.3"}]}]},{"source":"ghsa","ecosystem":"Packagist","package":"getkirby/cms","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.6.0"},{"fixed":"3.6.6.3"}]}]},{"source":"ghsa","ecosystem":"Packagist","package":"getkirby/cms","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.7.0"},{"fixed":"3.7.5.2"}]}]},{"source":"ghsa","ecosystem":"Packagist","package":"getkirby/cms","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.8.0"},{"fixed":"3.8.4.1"}]}]},{"source":"ghsa","ecosystem":"Packagist","package":"getkirby/cms","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.9.0"},{"fixed":"3.9.6"}]}]},{"source":"osv","ecosystem":"Packagist","package":"getkirby/cms","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.5.8.3"}]}],"versions":["3.0.0","3.0.1","3.0.1-rc.1","3.0.2","3.0.2-rc.1","3.0.3","3.0.3-rc.1","3.0.3-rc.2","3.0.3-rc.3","3.1.0","3.1.0-rc.1","3.1.1","3.1.2","3.1.2-rc.1","3.1.3","3.1.3-rc.1","3.1.4","3.1.4-rc.1","3.2.0","3.2.0-rc.1","3.2.0-rc.2","3.2.0-rc.3","3.2.0-rc.4","3.2.1","3.2.1-rc.1","3.2.2","3.2.3","3.2.3-rc.1","3.2.4","3.2.4-rc.1","3.2.5","3.2.5-rc.1","3.2.5-rc.2","3.3.0","3.3.0-rc.1","3.3.0-rc.2","3.3.0-rc.3","3.3.0-rc.4","3.3.0-rc.5","3.3.1","3.3.1-rc.1","3.3.2","3.3.2-rc.1","3.3.3","3.3.3-rc.1","3.3.4","3.3.4-rc.1","3.3.5","3.3.5-rc.1","3.3.6","3.4.0","3.4.0-rc.1","3.4.0-rc.2","3.4.0-rc.3","3.4.1","3.4.1-rc.1","3.4.2","3.4.3","3.4.3-rc.1","3.4.4","3.4.4-rc.1","3.4.5","3.5.0","3.5.0-rc.1","3.5.0-rc.2","3.5.0-rc.3","3.5.0-rc.4","3.5.0-rc.5","3.5.0-rc.6","3.5.0-rc.7","3.5.1","3.5.1-rc.1","3.5.2","3.5.2-rc.1","3.5.3","3.5.3.1","3.5.4","3.5.5","3.5.5-rc.1","3.5.6","3.5.6-rc.1","3.5.7","3.5.7-rc.1","3.5.7.1","3.5.8","3.5.8.1","3.5.8.2"]},{"source":"osv","ecosystem":"Packagist","package":"getkirby/cms","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.6.0"},{"fixed":"3.6.6.3"}]}],"versions":["3.6.0","3.6.1","3.6.1.1","3.6.2","3.6.2-rc.1","3.6.2-rc.2","3.6.2-rc.3","3.6.3","3.6.3-rc.1","3.6.3-rc.2","3.6.3.1","3.6.4","3.6.4-rc.1","3.6.5","3.6.5-rc.1","3.6.6","3.6.6-rc.1","3.6.6.1","3.6.6.2"]},{"source":"osv","ecosystem":"Packagist","package":"getkirby/cms","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.7.0"},{"fixed":"3.7.5.2"}]}],"versions":["3.7.0","3.7.0.1","3.7.0.2","3.7.1","3.7.1-rc.1","3.7.2","3.7.2-rc.1","3.7.2.1","3.7.3","3.7.3-rc.1","3.7.4","3.7.4-rc.1","3.7.5","3.7.5.1"]},{"source":"osv","ecosystem":"Packagist","package":"getkirby/cms","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.8.0"},{"fixed":"3.8.4.1"}]}],"versions":["3.8.0","3.8.1","3.8.1-rc.1","3.8.1.1","3.8.2","3.8.2-rc.1","3.8.3","3.8.3-rc.1","3.8.3-rc.2","3.8.4"]},{"source":"osv","ecosystem":"Packagist","package":"getkirby/cms","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.9.0"},{"fixed":"3.9.6"}]}],"versions":["3.9.0","3.9.1","3.9.1-rc.1","3.9.2","3.9.2-rc.1","3.9.3","3.9.3-rc.1","3.9.4","3.9.4-rc.1","3.9.5","3.9.5-rc.1","3.9.6-rc.1"]}],"products":[{"vendor":"getkirby","product":"kirby"}],"references":[{"url":"https://github.com/getkirby/kirby/security/advisories/GHSA-8fv7-wq38-f5c9","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/getkirby/kirby/commit/2f06ba1c026bc91cb0702bc16b7d505642536d15","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/getkirby/kirby/releases/tag/3.5.8.3","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","web"]},{"url":"https://github.com/getkirby/kirby/releases/tag/3.6.6.3","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","web"]},{"url":"https://github.com/getkirby/kirby/releases/tag/3.7.5.2","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","web"]},{"url":"https://github.com/getkirby/kirby/releases/tag/3.8.4.1","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","web"]},{"url":"https://github.com/getkirby/kirby/releases/tag/3.9.6","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-38491","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-8fv7-wq38-f5c9"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/38xxx/CVE-2023-38491.json","tags":["advisory"]},{"url":"https://github.com/getkirby/kirby","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2023-38491","title":"Kirby vulnerable to Cross-site scripting (XSS) from MIME type auto-detection of uploaded files","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.\n\nAn 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 `\u003cscript\u003e` 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.\n\nThe 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.\n\nThe 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.","status":"published","published":"2023-07-27T15:30:49.404Z","modified":"2024-10-15T15:30:05.72Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:35:29.772612Z"}],"euvd":[{"id":"EUVD-2023-2004","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.\n\nAn 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 `\u003cscript\u003e` 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.\n\nThe 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.\n\nThe 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.","status":"published","published":"2023-07-27T15:30:49Z","modified":"2024-10-15T15:30:05Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N","level":"medium"}],"updated_at":"2026-11-03T00:27:37.250145Z"}],"ghsa":[{"id":"GHSA-8fv7-wq38-f5c9","title":"Cross-site scripting (XSS) from MIME type auto-detection of uploaded files","description":"### TL;DR\n\nThis vulnerability 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.\n\nYour 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.\n\nThe attack requires user interaction by another user or visitor and *cannot* be automated.\n\n----\n\n### Introduction\n\nCross-site scripting (XSS) is a type of vulnerability that allows to execute any kind of JavaScript code inside the Panel session of the same or other users. In the Panel, a harmful script can for example trigger requests to Kirby's API with the permissions of the victim.\n\nSuch vulnerabilities are critical if you might have potential attackers in your group of authenticated Panel users. They can escalate their privileges if they get access to the Panel session of an admin user. Depending on your site, other JavaScript-powered attacks are possible.\n\n### Impact\n\nAn 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 `\u003cscript\u003e` 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 serve the file with an incorrect MIME type of `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.\n\nThe 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.\n\n### Patches\n\nThe problem has been patched in [Kirby 3.5.8.3](https://github.com/getkirby/kirby/releases/tag/3.5.8.3), [Kirby 3.6.6.3](https://github.com/getkirby/kirby/releases/tag/3.6.6.3), [Kirby 3.7.5.2](https://github.com/getkirby/kirby/releases/tag/3.7.5.2), [Kirby 3.8.4.1](https://github.com/getkirby/kirby/releases/tag/3.8.4.1) and [Kirby 3.9.6](https://github.com/getkirby/kirby/releases/tag/3.9.6). Please update to one of these or a [later version](https://github.com/getkirby/kirby/releases) to fix the vulnerability.\n\nIn all of the mentioned releases, we 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.\n\n### Credits\n\nThanks to Shankar Acharya (@5hank4r) for responsibly reporting the identified issue.","status":"published","published":"2023-07-28T15:34:36Z","modified":"2023-11-05T05:01:00Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:37:13.301199Z"}],"nvd":[{"id":"CVE-2023-38491","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.\n\nAn 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 `\u003cscript\u003e` 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.\n\nThe 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.\n\nThe 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.","status":"published","published":"2023-07-27T16:15:10.81Z","modified":"2026-06-17T06:10:18.62Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N","level":"medium","assessor":"secondary"},{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:08:18.687088Z"}],"osv":[{"id":"CVE-2023-38491","title":"Kirby vulnerable to Cross-site scripting (XSS) from MIME type auto-detection of uploaded files","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.\n\nAn 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 `\u003cscript\u003e` 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.\n\nThe 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.\n\nThe 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.","status":"published","published":"2023-07-27T15:30:49.404Z","modified":"2026-10-28T02:31:10.173782522Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:44:32.922049Z"},{"id":"GHSA-8fv7-wq38-f5c9","title":"Cross-site scripting (XSS) from MIME type auto-detection of uploaded files","description":"### TL;DR\n\nThis vulnerability 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.\n\nYour 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.\n\nThe attack requires user interaction by another user or visitor and *cannot* be automated.\n\n----\n\n### Introduction\n\nCross-site scripting (XSS) is a type of vulnerability that allows to execute any kind of JavaScript code inside the Panel session of the same or other users. In the Panel, a harmful script can for example trigger requests to Kirby's API with the permissions of the victim.\n\nSuch vulnerabilities are critical if you might have potential attackers in your group of authenticated Panel users. They can escalate their privileges if they get access to the Panel session of an admin user. Depending on your site, other JavaScript-powered attacks are possible.\n\n### Impact\n\nAn 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 `\u003cscript\u003e` 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 serve the file with an incorrect MIME type of `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.\n\nThe 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.\n\n### Patches\n\nThe problem has been patched in [Kirby 3.5.8.3](https://github.com/getkirby/kirby/releases/tag/3.5.8.3), [Kirby 3.6.6.3](https://github.com/getkirby/kirby/releases/tag/3.6.6.3), [Kirby 3.7.5.2](https://github.com/getkirby/kirby/releases/tag/3.7.5.2), [Kirby 3.8.4.1](https://github.com/getkirby/kirby/releases/tag/3.8.4.1) and [Kirby 3.9.6](https://github.com/getkirby/kirby/releases/tag/3.9.6). Please update to one of these or a [later version](https://github.com/getkirby/kirby/releases) to fix the vulnerability.\n\nIn all of the mentioned releases, we 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.\n\n### Credits\n\nThanks to Shankar Acharya (@5hank4r) for responsibly reporting the identified issue.","status":"published","published":"2023-07-28T15:34:36Z","modified":"2024-02-16T08:05:06.128253Z","cvss":[{"version":"3.1","score":5.7,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:42.437513Z"}]}}
