What is Law 05-20 on cybersecurity?
Law No. 05-20 on cybersecurity was enacted in July 2020. It is Morocco's first statute dedicated specifically to information systems security. Before it, most rules came from regulations and from frameworks such as the DNSSI. The law gives those requirements a legal footing, specifies who must apply them and empowers a national authority to check compliance.
It is supplemented by an implementing decree (Decree No. 2-21-406, adopted in 2021), which sets out how the obligations apply to each category of entity, and by decisions and frameworks issued by the national authority. In practice, you need to read the law together with its decree and the DGSSI's technical documents: that combination defines what an organization actually has to put in place.
The idea behind the text is straightforward: cybersecurity is no longer a purely technical matter left to each IT department, but a governance obligation, with named responsibilities, minimum measures, controls and penalties for non-compliance.
The role of the DGSSI and maCERT
The General Directorate for Information Systems Security (DGSSI), which reports to the National Defence Administration, is the national cybersecurity authority referred to in the law. It drafts frameworks, supports the entities concerned, qualifies certain providers (security audit providers, for example) and monitors compliance.
maCERT, the national centre for monitoring, detecting and responding to cyberattacks, sits within the DGSSI. It is the operational contact when an incident occurs: it publishes vulnerability alerts, receives incident reports and can assist affected organizations. For any Moroccan security team, following its bulletins is basic hygiene.
- Drafting and publishing national frameworks, including the DNSSI
- Receiving and handling security incident reports
- Qualifying cybersecurity service providers
- Approving (homologating) certain sensitive information systems
- Monitoring compliance and raising awareness
Which organizations does Law 05-20 apply to?
The law does not apply uniformly to every company in the country. It primarily targets the public sector and organizations whose failure would have a serious national impact. Requirements vary by category, with critical infrastructure operators carrying the heaviest load.
Private companies outside these categories are not directly subject to the law. They are, however, often affected indirectly as suppliers or subcontractors of a covered entity that passes security requirements down through contracts. To know exactly whether your organization is covered, refer to the law, its decree and, if needed, ask the DGSSI.
- State administrations and local authorities
- Public institutions and state-owned companies, and other public-law legal entities
- Critical infrastructure (infrastructures d'importance vitale, IIV) operating sensitive information systems, in sectors such as energy, finance, health, transport or telecoms
- Public telecom network operators and internet service providers
- Cybersecurity service providers and certain digital service providers or platform publishers

The main obligations
Obligations fall into three groups: governance (who is accountable, under which policy), risk management and technical measures, and the relationship with the national authority (incident reporting, audits, inspections). Critical infrastructure operators face additional requirements, such as having sensitive systems approved before they go live and rules on where their sensitive data is hosted.
The law provides for penalties in case of non-compliance. Since amounts and conditions depend on the type of breach and the category of entity, check the law itself rather than figures quoted without a source.
- Adopt an information systems security policy (ISSP) aligned with DGSSI frameworks
- Appoint an information systems security officer with the independence and resources the role requires
- Inventory and classify information assets by sensitivity
- Carry out a risk assessment and implement proportionate safeguards
- Report security incidents to the DGSSI (maCERT) as soon as they are detected
- Have security audits performed, by qualified providers where required
- For critical infrastructure: obtain approval for sensitive information systems and follow the hosting rules for sensitive data
DNSSI, Law 09-08 and the CNDP: how do the texts fit together?
The National Information Systems Security Directive (DNSSI), published by the DGSSI in 2013, is the reference catalogue of security measures for government bodies and critical infrastructure. It draws heavily on ISO/IEC 27002 and covers security organization, asset management, physical security, access control, operations, incident management and business continuity. An organization that has already built an ISO 27001 ISMS therefore has a strong basis for demonstrating DNSSI compliance.
Law 09-08 on the protection of individuals with regard to the processing of personal data has a different goal: protecting people's rights. It is overseen by the CNDP (the national data protection commission) and applies to any public or private organization processing personal data. Among other things, it requires filings with the CNDP and an obligation to secure the data being processed.
The two regimes complement each other: a single data leak can be both an incident to report under Law 05-20 and a personal data security failure under Law 09-08. That is why a single governance model works best, with the CISO and the data protection lead sharing the same registers, the same risk assessment and the same incident procedure.
Which skills and certifications help you comply?
Compliance with Law 05-20 is first and foremost an organizational project, but it also requires technical skills to detect and handle incidents. Few organizations have every profile in-house, so upskilling existing teams is often the most realistic route.
- ISO/IEC 27001 Lead Implementer (PECB): build an ISMS, run the risk assessment, write the security policy and Statement of Applicability, prepare for audits. This is the skill set most closely tied to the DNSSI.
- CISM (ISACA): run the security programme, report to management and manage incidents; suited to future CISOs.
- CISSP (ISC2): broad coverage of architecture, risk management, network security and operations, for experienced security leaders.
- CND v3 (EC-Council): protect, detect and respond at network level, for system and network administrators.
- CompTIA CySA+: log analysis, vulnerability management and incident response, for SOC analysts who feed incident reports to maCERT.
Where to start, and how GATech can help
A pragmatic approach is to first check whether and in which category your organization falls under the law, then run a gap assessment against the DNSSI, appoint a security officer, formalize the incident reporting procedure and finally schedule audits. Each of these steps depends on trained people.
GATech offers training in Morocco for the certifications above, official exam included: ISO 27001 Lead Implementer from 17,900 MAD (5 days), CISM from 19,900 MAD (4 days), CISSP from 23,900 MAD (5 days), CND v3 from 15,900 MAD (5 days) and CySA+ from 12,900 MAD (5 days), in class or online.
This guide is provided for general information only and does not constitute legal advice. For an assessment of your situation, consult the official texts, the DGSSI or a qualified lawyer.
Frequently asked questions
Is my private company subject to Law 05-20?
Not necessarily. The law mainly targets government bodies, public institutions and state-owned companies, critical infrastructure and certain operators (telecoms, internet service providers, cybersecurity and digital service providers). A private company outside these categories is not directly covered, but clients that are covered may impose contractual requirements on it. If in doubt, check the law and its decree or ask the DGSSI.
Who do you report a cybersecurity incident to in Morocco?
Entities covered by Law 05-20 report security incidents to the national authority, the DGSSI, through its operational centre maCERT. If the incident involves personal data, you also need to assess your obligations under Law 09-08 and towards the CNDP.
What is the difference between Law 05-20 and the DNSSI?
Law 05-20 is a statute that sets obligations, the parties concerned and penalties. The DNSSI, published by the DGSSI in 2013, is a technical catalogue of security measures inspired by ISO/IEC 27002, used as the basis for implementing those obligations in government bodies and critical infrastructure.
Is ISO 27001 certification enough to comply with Law 05-20?
Not automatically. An ISO 27001-certified ISMS covers much of what the DNSSI expects and makes compliance far easier, but the law also has specific obligations: incident reporting to the DGSSI, approval of certain systems and the use of qualified providers for some audits. You need to add these requirements on top of the ISMS.
Which certification is best for leading Law 05-20 compliance?
For building the governance framework and security policy, ISO 27001 Lead Implementer is the most directly useful. For a CISO who runs the programme and reports to management, CISM or CISSP are solid choices. For technical teams that detect and handle incidents, CND v3 and CySA+ are a better fit.
GATech teaching team
Cybersecurity trainers and consultants preparing professionals in Morocco for CEH, OSCP+, CISSP, CompTIA and ISO 27001.
Published



