Legal AI

Cybersecurity of high-risk AI: the attacks and measures in sandbox Guide 11

Article 15 of the AI Regulation requires high-risk systems to resist attempts to alter their operation. Guide 11 of the Spanish sandbox describes the attacks specific to AI and the measures for the provider and for whoever deploys the system.

Editorial photo: high-risk AI cybersecurity
Image generated with AI

An artificial intelligence system can fail because someone attacks it. And attacks on AI are not only the classic ones on any computer system: there are specific techniques that manipulate the data it learns from or the inputs it receives. Guide 11, "Cybersecurity", of the Spanish regulatory sandbox pilot, explains them.

Its version 2.0 dates from 17 July 2026, adapted to the Digital Omnibus; version 1.0 is from 10 December 2025. It is credited to the Ministry for Digital Transformation and the Civil Service and, like the rest of the series, is not binding.

The basis: Article 15 of the AI Regulation

The guide focuses on two paragraphs of Article 15 of Regulation (EU) 2024/1689, on accuracy, robustness and cybersecurity of high-risk systems:

  • Paragraph 1: systems must reach an appropriate level of cybersecurity and perform consistently throughout their lifecycle.
  • Paragraph 5: they must be resilient against attempts by unauthorised third parties to alter their use, outputs or performance.

Accuracy and robustness are dealt with in other guides in the series.

Attacks specific to AI

AttackWhat it consists of, according to the guide
Data poisoningManipulating the training data set
Model poisoningManipulating pre-trained components
Adversarial examplesInputs designed to make the model err
Attacks on confidentialityExpressly mentioned in Article 15.5, according to the guide
Model flawsAlso mentioned in Article 15.5, according to the guide

Who must do what

The provider must adopt organisational and technical measures, plan cybersecurity from the design stage, include specific recommendations in the instructions for use and define indicators and periodic audits.

The deployer must read and apply the provider's instructions, distribute installation and configuration information within its organisation and, if the system is on its premises or it manages it, treat it as an asset to protect within its cybersecurity policy. If it retrains the system, it takes on responsibilities similar to the provider's on data.

How a system defends itself against adversarial examples

The guide goes down to the technical level and proposes concrete defences. Against adversarial examples, it recommends adding detection subnetworks that run separately from the main model and are trained specifically to identify attack patterns in suspicious inputs. It also advises building in confidence metrics and distribution analysis with thresholds that trigger alerts on high-uncertainty results or outputs far from expected behaviour. And it proposes organising the work with a blue team / red team scheme: the blue team develops the model and the red team subjects it to adversarial attacks of different kinds, with white-box, grey-box or black-box scenarios, so that every iteration of the model is tested before moving on.

Open tools for testing robustness

To run those tests, the guide names concrete, freely accessible tools: MLSecTools, designed to carry out penetration tests and assess the robustness of machine learning models against adversarial attacks, and the Adversarial Robustness Toolbox, IBM's open-source framework for running robustness tests and adversarial attacks on AI models. The recommendation is to integrate them into the development and evaluation process to detect vulnerabilities such as backdoors effectively, a vector the guide treats with special attention because of its ability to alter the model's behaviour without visible symptoms.

Protecting the code and access to the model

Another front the guide covers in detail is the exposure of the model's code. Access policies must restrict it to authorised and qualified staff, with robust identity and authentication controls, multifactor authentication or certificates, and detailed logging of every interaction. Development equipment must be protected against exfiltration, for example by blocking removable media and access to public networks, and traffic with the central repository must run over encrypted channels, such as a virtual private network, to prevent manipulation of the model in transit through man-in-the-middle attacks. These are measures common to any IT system, but the guide stresses that they take on special relevance given the sensitivity and complexity of the models.

Contingency plans and audits with simulated attacks

Cybersecurity does not end with prevention. The guide recommends contingency and incident-response plans for cyber incidents that may affect the system, and recommends continuously monitoring the cybersecurity indicators on the system's dashboard. Periodic audits, it adds, must include simulations of adversarial attacks to uncover undocumented flaws, and it is useful to rely on real-time monitoring tools, based on AI itself, that detect anomalous patterns in the system's behaviour. For a firm deploying a high-risk system, this part of the guide is the one that translates best into an action plan: indicators, audits and a written response plan.

Supply chain and denial of service: the attacks you do not see

The guide pays specific attention to two lesser-known vectors. The first is the supply chain: the attacker introduces malicious or manipulated components at any point in the life cycle, from compromised software dependencies or malicious libraries in development to manipulation of the physical computing infrastructure, with persistent attacks that are hard to detect. The response the guide proposes is rigorous verification and validation of every element in the supply chain, something especially critical in systems that depend on open-source or third-party components. The second vector is denial of service specific to artificial intelligence: queries designed to maximise the model's resource consumption, with inputs that require especially intensive computation or trigger its worst performance cases, particularly effective in systems operating in real time or with strict latency requirements. Exhaustion attacks are also covered, for example forcing the system to generate a massive number of files. These attacks occur mainly in the inference phase, but they demand protection decisions from the design stage.

Everything starts with the asset inventory

Before any technical measure, the guide places an organisational one: the inventory of the system's assets and actors, as complete as possible and serving as the basis for the threat model. It does not demand large infrastructure: it can range from an office file or a simple database to asset-management tools already on the market, depending on the size of the organisation. It does recommend that the documentation system be centralised, with inventories kept updated and available, and that sizing take concurrent access and seasonality into account to avoid lockouts from excess connections.

Some of the measures it proposes

  • Inventory of data, models, software and actors, with assigned responsibilities.
  • Threat model aligned with the risk analysis, especially for rights and freedoms.
  • Access policies, with separation of duties where possible.
  • Specific training in AI cybersecurity.
  • Version control of data and models, and encryption in transit and at rest.
  • Detection of anomalous inputs and query limiting.
  • Security testing, including penetration tests oriented to machine learning.
  • Multi-factor authentication, detailed logs and continuous monitoring.

The guide also recalls that the Cyber Resilience Act will apply, from 11 December 2027, to products with digital elements classified as high-risk AI systems.

Usefulness for lawyers

In procurement. The distinction between what falls to the provider and what falls to the deployer is useful for drafting supply contracts for high-risk systems: who audits, who updates and who answers for each layer of security.

In incident management. If a system is attacked, knowing which measures should have been in place helps assess responsibility.

In-house. Even if a firm does not use high-risk systems, the basic ideas, such as access control, training or multi-factor authentication, apply equally to its generative AI tools. The AEPD's guidance goes in the same direction, as we explain in the article on agentic AI and data protection.

The series of guides

This is the fourth sandbox guide we have summarised. The earlier ones deal with data governance, transparency and high-risk practical cases.

More analysis in Legal AI.

Fuentes

  1. Ministerio para la Transformación Digital y de la Función Pública. Guía 11. Ciberseguridad, versión 2.0, 17 de julio de 2026 (PDF). Accessed 18 October 2026.

The specific data in this article come from the official sources cited.

Agente Lex Newsroom Redacción

Editorial team of AGENTE LEX. We produce analysis and news for the legal profession from public and official sources, which we link at the end of each article.

View profile and articles →