Files
Lorenz Junglas 0a7c021079 ! Fix CompilerService attributes based RCE exploit (#4307)
* ! Add tests replicating H1-3601675 attribute RCE

* ! Add tests for potentially dangerous SkipLocalsInit, AsyncMethodBuilder

* ! Blacklist SkipLocalsInit, UnsafeAccessor, AsyncMethodBuilder
2026-03-18 10:00:01 +01:00

20 lines
660 B
C#

namespace Sandbox;
static partial class CompilerRules
{
public static readonly List<string> Attributes =
[
"System.Runtime.CompilerServices.InlineArrayAttribute*",
"System.Runtime.CompilerServices.ExtensionMarkerAttribute",
"System.Runtime.CompilerServices.ParamCollectionAttribute",
// Can be used to read uninitialized stack memory.
"System.Runtime.CompilerServices.SkipLocalsInitAttribute*",
// All of these can potentially lead to RCEs
"System.Runtime.CompilerServices.UnsafeAccessorAttribute*",
"System.Runtime.CompilerServices.UnsafeAccessorTypeAttribute*",
"System.Runtime.CompilerServices.AsyncMethodBuilderAttribute*",
];
}