diff --git a/articles/imagesharp/security.md b/articles/imagesharp/security.md index 9e3d68df..36143dbb 100644 --- a/articles/imagesharp/security.md +++ b/articles/imagesharp/security.md @@ -1,8 +1,8 @@ # Security Considerations -Image processing is a memory-intensive application. Most image processing libraries (including ImageSharp and SkiaSharp) decode images into in-memory buffers. Any publicly facing service using such a library might be vulnerable to DoS attacks without implementing further measures. +Image processing is a memory-intensive application. Most image processing libraries (including ImageSharp, SkiaSharp and Magick.NET) decode images into in-memory buffers for further processing. Without additional measures, any publicly facing service that consumes images coming from untrusted sources might be vulnerable to DoS attacks attempting to deplate process memory. -For solutions using ImageSharp such measures can be: +Such measures can be: - Authentication, for example by using HMAC. See [Securing Processing Commands in ImageSharp.Web](../imagesharp.web/processingcommands.md#securing-processing-commands). - Offloading to separate services/containers. - Placing the solution behind a reverse proxy. @@ -12,7 +12,7 @@ For solutions using ImageSharp such measures can be: ```csharp Configuration.Default.MemoryAllocator = MemoryAllocator.Create(new MemoryAllocatorOptions() { - // Note that this limits the maximum image size to 64 megapixels. + // Note that this limits the maximum image size to 64 megapixels of Rgba32. // Any attempt to create a larger image will throw. AllocationLimitMegabytes = 256 });