Moderate severityNVD Advisory· Published Jun 3, 2025· Updated Jun 3, 2025
Umbraco Vulnerable to By-Pass of Configured Allowed Extensions for File Uploads
CVE-2025-48953
Description
Umbraco is an ASP.NET content management system (CMS). Starting in version 14.0.0 and prior to versions 15.4.2 and 16.0.0, it's possible to upload a file that doesn't adhere with the configured allowable file extensions via a manipulated API request. The issue is patched in versions 15.4.2 and 16.0.0. No known workarounds are available.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
Umbraco.CmsNuGet | >= 14.0.0, < 15.4.2 | 15.4.2 |
Affected products
1- Range: >= 14.0.0, < 15.4.2
Patches
1d920e93d1ee2Merge commit from fork
2 files changed · +86 −7
src/Umbraco.Core/Configuration/ContentSettingsExtensions.cs+10 −7 modified@@ -5,14 +5,17 @@ namespace Umbraco.Extensions; public static class ContentSettingsExtensions { /// <summary> - /// Determines if file extension is allowed for upload based on (optional) white list and black list - /// held in settings. - /// Allow upload if extension is whitelisted OR if there is no whitelist and extension is NOT blacklisted. + /// Determines if file extension is allowed for upload based on (optional) allow list and deny list held in settings. + /// Disallowed file extensions are only considered if there are no allowed file extensions. /// </summary> - public static bool IsFileAllowedForUpload(this ContentSettings contentSettings, string extension) => - contentSettings.AllowedUploadedFileExtensions.Any(x => x.InvariantEquals(extension)) || - (contentSettings.AllowedUploadedFileExtensions.Any() == false && - contentSettings.DisallowedUploadedFileExtensions.Any(x => x.InvariantEquals(extension)) == false); + /// <param name="contentSettings">The content settings.</param> + /// <param name="extension">The file extension.</param> + /// <returns> + /// <c>true</c> if the file extension is allowed for upload; otherwise, <c>false</c>. + /// </returns> + public static bool IsFileAllowedForUpload(this ContentSettings contentSettings, string extension) + => contentSettings.AllowedUploadedFileExtensions.Any(x => x.InvariantEquals(extension.Trim())) || + (contentSettings.AllowedUploadedFileExtensions.Any() == false && contentSettings.DisallowedUploadedFileExtensions.Any(x => x.InvariantEquals(extension.Trim())) == false); /// <summary> /// Gets the auto-fill configuration for a specified property alias.
tests/Umbraco.Tests.UnitTests/Umbraco.Core/Configuration/ContentSettingsExtensionsTests.cs+76 −0 added@@ -0,0 +1,76 @@ +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using NUnit.Framework; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Extensions; + +namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Core.Configuration; + +[TestFixture] +public class ContentSettingsExtensionsTests +{ + [TestCase("jpg")] + [TestCase("JPG")] + [TestCase("jpg ")] + public void IsFileAllowedForUpload_Allows_File_In_Allow_List(string extension) + { + var contentSettings = new ContentSettings + { + AllowedUploadedFileExtensions = ["jpg", "png"], + }; + + Assert.IsTrue(contentSettings.IsFileAllowedForUpload(extension)); + } + + [TestCase("gif")] + [TestCase("GIF")] + [TestCase("gif ")] + public void IsFileAllowedForUpload_Rejects_File_Not_In_Allow_List(string extension) + { + var contentSettings = new ContentSettings + { + AllowedUploadedFileExtensions = ["jpg", "png"], + }; + + Assert.IsFalse(contentSettings.IsFileAllowedForUpload(extension)); + } + + [TestCase("jpg")] + [TestCase("JPG")] + [TestCase("jpg ")] + public void IsFileAllowedForUpload_Allows_File_Not_In_Disallow_List(string extension) + { + var contentSettings = new ContentSettings + { + DisallowedUploadedFileExtensions = ["gif", "png"], + }; + + Assert.IsTrue(contentSettings.IsFileAllowedForUpload(extension)); + } + + [TestCase("gif")] + [TestCase("GIF")] + [TestCase("gif ")] + public void IsFileAllowedForUpload_Rejects_File_In_Disallow_List(string extension) + { + var contentSettings = new ContentSettings + { + DisallowedUploadedFileExtensions = ["gif", "png"], + }; + + Assert.IsFalse(contentSettings.IsFileAllowedForUpload(extension)); + } + + [Test] + public void IsFileAllowedForUpload_Allows_File_In_Allow_List_Even_If_Also_In_Disallow_List() + { + var contentSettings = new ContentSettings + { + AllowedUploadedFileExtensions = ["jpg", "png"], + DisallowedUploadedFileExtensions = ["jpg"], + }; + + Assert.IsTrue(contentSettings.IsFileAllowedForUpload("jpg")); + } +}
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4- github.com/advisories/GHSA-fr6r-p8hv-x3c4ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-48953ghsaADVISORY
- github.com/umbraco/Umbraco-CMS/commit/d920e93d1ee29dc3301697e444f53e8cd5db3cf9ghsax_refsource_MISCWEB
- github.com/umbraco/Umbraco-CMS/security/advisories/GHSA-fr6r-p8hv-x3c4ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.