Skip to content
EnglishFrançais

Platforms / Sitecore

Sitecore security scan

A Sitecore security scan is the CMS Security Audit of the custom C# code, Razor views, configuration patches and Next.js rendering host of a Sitecore project.

The CMS Security Scanner reads the custom code of Sitecore XP and XM 8.2 to 10.x, headless JSS or Content SDK, and XM Cloud projects. The scan covers the C# solution and the Next.js rendering host, and a CMS Security Consultant checks each finding.

Request a scanSee a sample report

Versions

Sitecore XP and XM 8.2 to 10.x, headless projects with JSS or the Content SDK on Next.js, and XM Cloud

Code read

C#, Razor views, XML configuration patches, Next.js and TypeScript code, and serialized items from SCS, Unicorn or TDS

What we need

The .NET solution, the App_Config patch files, the serialized items and the rendering host with its lock files, with secret values removed

Report

One finding per issue, with its entry point, its severity and a fix for your developers

How Sitecore receives a request

  • Sitecore XP and XM 8.2 to 10.x are ASP.NET applications on .NET Framework, split into Content Management (CM) and Content Delivery (CD) roles.
  • Each request goes through pipelines, which are named lists of processor classes such as httpRequestBegin and mvc.renderRendering.
  • XML patch files under App_Config/Include register custom processors, handlers, agents and settings, so the configuration is part of the code.
  • In a headless project, the Layout Service and GraphQL return page data as JSON, and a Next.js rendering host builds the HTML.
  • On XM Cloud, content goes to Experience Edge, and most custom code runs in the Next.js rendering host.

Entry points reviewed

The scan lists every construct where a request, a user, a job or another system reaches custom code, with its access control.

CategoryConstruct in your codeRisk
MVC controllers and controller renderingsSitecoreController and Controller classes, controller rendering items, custom routes registered in the initialize pipelineEach action method reads request data, and a custom route can skip the item resolution and its access checks.
Web API and Sitecore Services ClientApiController classes, ItemService, EntityService controllers and the Services Client security policyA weak policy or a missing authorization attribute can expose item data or item writes to anonymous users.
Request pipeline processorsProcessors in preprocessRequest, httpRequestBegin, mvc.* pipelines, item resolvers, link providers and getMediaStreamThese processors run on every request, often before the page renders and before many access checks run.
HTTP handlers, modules and WebFormsIHttpHandler (.ashx) and IHttpModule classes, customHandlers entries, .aspx pages and sublayouts with ViewStateA handler answers a URL outside the Sitecore page pipeline, and WebForms code depends on the machineKey configuration.
Layout Service and GraphQL extensionsgetLayoutServiceContext processors, contents resolvers, GraphQL schema providers and schema extendersThese classes add data to the public JSON and GraphQL responses that the rendering host and the browser receive.
Next.js rendering hostAPI routes, route handlers, middleware, server components, server actions and the editing render and data routesThis server code holds API keys, calls Sitecore and Experience Edge, and must reject editing requests without the editing secret.
Sitecore FormsCustom submit actions based on SubmitActionBase, custom field types, validators and file upload fieldsA submit action receives visitor data and often writes it to a database, a CRM or an email service.
Fields and rendering parametersCustom field types, renderField processors, rendering parameter templates and Rich Text settingsEditor-controlled values reach the HTML output, so a missing encoding step becomes stored cross-site scripting.
Scheduled agents, events and publishingScheduling agents, task command items, item and publish event handlers, publish and publishItem processorsThis code runs without a visitor request, often with security disabled, and can change what the public site shows.
Content Management extensionsSheer UI commands, ribbon buttons, SPEAK dialogs and custom pages under /sitecore/adminAn authoring extension must check the rights of the editor, because a direct URL can call it.
Sitecore PowerShell ExtensionsSPE scripts in serialized items, SPE integration points and the web service switches in Spe.configSPE runs PowerShell on the CM server, so script access, remoting and session elevation need strict control.
Authentication and identitySitecore Identity plugins, owin.identityProviders processors, claim transformations, external user builders and CD login controllersSign-in code decides who a user is and which Sitecore roles that user receives.
xConnect, xDB and Content SearchCustom facets, contact identification code, Marketing Automation activities, computed index fields and search controllersThis code stores visitor personal data and builds search queries from visitor input.
Configuration patches and serialized itemsApp_Config/Include patch files, web.config transforms, and serialized roles, access rights and API key itemsA patch file can remove a security processor, and a serialized item can grant rights or open an API key to every origin.

Dangerous operations traced

The scan traces user data from each entry point to the operations below.

OperationWhat the scanner looks for
Security context bypassSecurityDisabler and UserSwitcher blocks that a visitor request can reach, and item writes, deletes or publishes inside them.
Query injectionSitecore query and fast query strings, Content Search predicates, raw Solr queries and SQL commands built from user input.
Cross-site scriptingHtml.Raw, HtmlString, Response.Write and dangerouslySetInnerHTML with field values, rendering parameters or request data.
.NET deserializationBinaryFormatter, LosFormatter, ObjectStateFormatter and Json.NET TypeNameHandling settings that accept data from a request, cookie or header.
Server-side request forgeryHttpClient, WebClient and fetch calls in Next.js server code where the request controls the target URL.
Path traversal and file uploadFile and Path APIs, ZIP extraction and media upload code that build a file path from request data.
XML external entities and code executionXML parsers with DTD processing enabled, XSLT with scripts, Process.Start, PowerShell runspaces and type names from input.
Open redirectResponse.Redirect, RedirectResult, returnUrl parameters and Next.js redirects to a target that the request controls.
Cache poisoningHTML cache keys, output cache settings and Next.js cache keys that a request can influence.
Secrets and missing request controlsCredentials in source control, server secrets in NEXT_PUBLIC_ variables, and state-changing endpoints without anti-forgery or authorization checks.

Dependencies and configuration checked

  • Sitecore platform version from Sitecore.Kernel and the Sitecore NuGet packages, compared with the Sitecore security bulletins and installed hotfixes
  • Sitecore modules such as SXA, Headless Services, Sitecore Forms, Sitecore PowerShell Extensions, Unicorn and Glass.Mapper
  • Newtonsoft.Json, with its version and every TypeNameHandling setting in custom code
  • Telerik UI for ASP.NET AJAX in older Content Management installations
  • OWIN, OpenID Connect, WS-Federation and JWT packages that custom authentication code uses
  • next, react, @sitecore-jss and @sitecore-content-sdk packages and the lock file of the rendering host
  • Each component compared with public advisories, with a check of whether custom code reaches the vulnerable part
  • machineKey, ViewState, customErrors, debug compilation and cookie settings in web.config
  • Separation of CM and CD roles, with admin tools and client pages disabled on Content Delivery
  • Sitecore Services Client security policy and anonymous access
  • Sitecore PowerShell Extensions web services, remoting and session elevation
  • Upload restrictions, media request protection and SQL Server access from XSLT
  • Sitecore Identity client secrets, CORS origins and signing certificates
  • Layout Service API key items, the JSS editing secret, Experience Edge tokens and next.config.js headers and image hosts
  • Secrets in ConnectionStrings.config, appSettings, environment files and container definitions

Typical findings

Sitecore security bulletins show the vulnerability classes that the scan looks for in custom code and configuration.

  • Insecure deserialization in a product handler, the class of CVE-2021-42237
  • Code injection leading to remote code execution, such as CVE-2023-35813
  • Unauthenticated arbitrary file read, such as CVE-2024-46938
  • Insecure deserialization of request data, such as CVE-2025-27218
  • Hardcoded credentials and ZIP path traversal, such as CVE-2025-34509 and CVE-2025-34510
  • Unrestricted file upload in PowerShell Extensions, such as CVE-2025-34511
  • HTML cache poisoning and information disclosure, such as CVE-2025-53693 and CVE-2025-53694
  • ViewState deserialization with a sample machineKey, such as CVE-2025-53690

Frequently asked questions about Sitecore

What is in scope for a Sitecore project?

The scanner reviews the custom code of the project, not the Sitecore product. This includes C# controllers, pipeline processors, Razor views, configuration patches, serialized items and the Next.js rendering host. CMS Security Consultants review each finding before the report.

Does the scan work with XM Cloud and headless Sitecore?

Yes. On XM Cloud, now named SitecoreAI, most custom code runs in the Next.js rendering host. The scan reads its API routes, middleware, server components and environment variables. It also reads the configuration patches, serialized items and PowerShell scripts that the project deploys.

Which Sitecore versions does the scan cover?

The scan covers Sitecore XP and XM 8.2 to 10.x, headless projects with JSS or the Content SDK, and XM Cloud. It compares the Sitecore version and hotfixes of your project with the Sitecore security bulletins.

Why does the scan check the machineKey and ViewState configuration?

ASP.NET uses the machineKey to protect ViewState, and a key that is shared or copied from a public sample protects nothing. Sitecore bulletin SC2025-005 concerns deployments that used a sample key. The scan checks that each environment has its own key and that the key is not in source control.

Why is .NET deserialization a central check for Sitecore?

Several critical Sitecore bulletins since 2021 concern insecure deserialization. Custom code can add the same weakness through BinaryFormatter or Json.NET TypeNameHandling. The scan finds these constructs and checks if request data reaches them.

What do we need to send for a Sitecore scan?

Send the .NET solution, the App_Config patch files, the serialized items and the rendering host source with its lock files. The scan needs no access to a production server. Remove secret values before you send the configuration.

Other platforms

The same method, report and consultants apply to each platform.

Request a Sitecore security scan

Tell us how to reach you. A CMS Security Consultant will contact you to plan your Sitecore scan.