Guide

NIS2 and penetration testing

NIS2 doesn't use the words “penetration test” in its articles, but it does require entities to test whether their security measures work, and the implementing rules for digital providers spell out how. This is what the texts say and how a pentest fits.

Updated 11 November 2026 · By the Closeout team

Does NIS2 require a penetration test?

Not by name. NIS2 requires essential and important entities to assess how effective their cybersecurity measures are and to handle vulnerabilities, and leaves the method to a risk-based choice. For the digital providers covered by Implementing Regulation (EU) 2024/2690, security testing is an explicit obligation, and the regulation names penetration tests as one kind of security test.

What the directive says (Article 21)

  • Article 21(2)(e): security in the acquisition, development and maintenance of network and information systems, including vulnerability handling and disclosure.
  • Article 21(2)(f): policies and procedures to assess the effectiveness of cybersecurity risk-management measures.
  • Article 32: for essential entities, authorities can order regular and targeted security audits and security scans.

The implementing regulation for digital providers

Implementing Regulation (EU) 2024/2690 applies to DNS providers, TLD registries, cloud, data centre and CDN providers, managed service and managed security service providers, online marketplaces, search engines, social networks and trust service providers. Point 6.5 of its annex requires them to:

  • have a policy and procedures for security testing;
  • decide the need, scope, frequency and type of tests from their risk assessment;
  • test according to a documented methodology;
  • document the type, scope, time and results of each test, with the criticality and mitigating actions for each finding;
  • apply mitigating actions for critical findings.

Its recital 15 says security tests may include automated or manual tests, penetration tests and vulnerability scanning. Point 6.10 adds that vulnerabilities critical to operations are addressed without undue delay, and that a vulnerability not remediated is documented with the reason.

National laws

NIS2 is a directive, so it applies through each country's law, and the details (who is in scope, which authority supervises) depend on it. The transposition deadline was 17 October 2024. In Spain, the draft Ley de Coordinación y Gobernanza de la Ciberseguridad was approved by the Council of Ministers in January 2025 but had not been published in the BOE when we checked; meanwhile, suppliers to the Spanish public sector must already meet the ENS.

Evidence to keep

  • The report, with scope, dates, methodology, who tested and every finding with its severity.
  • The remediation record: owner, due date and status of each finding, with dates.
  • The retest, which proves each fix works, not just that someone marked it done. See our guide to pentest retesting.
  • Accepted risks, in writing, by someone with the authority, with a reason and a review date.
  • An attestation letter if the client must show the result to third parties without sharing the full report. You can make one with the attestation letter generator.
Closeout keeps that record for you: it delivers the report in a branded portal, tracks each finding against its deadline, verifies fixes with a retest and issues the attestation letter that cites the report by its SHA-256 hash.

Sources

Official texts, checked in November 2026. This is a practical guide, not legal or audit advice.

Frequently asked questions

Is penetration testing mandatory under NIS2?

The directive doesn't name it. It requires assessing the effectiveness of security measures and handling vulnerabilities. Implementing Regulation (EU) 2024/2690 makes security testing mandatory for certain digital providers and names penetration tests as one type.

How often does NIS2 require security testing?

Neither text sets a frequency. Under Implementing Regulation (EU) 2024/2690, the entity decides it from its risk assessment and must document it in its testing policy.

What must a NIS2 test report include?

For entities under Implementing Regulation (EU) 2024/2690: the type, scope, time and results of the tests, including the criticality of each finding and the mitigating actions.