Attention in Spanish and English Schedule (Madrid) L–J 09:00–14:00 · 16:00–19:15 | Fri 08:00-15:00

Cybercrimes in Spain: what they are, types, and regulations

Cybercrime in Spain: What it is, types, and regulation in the Penal Code. The digital revolution has transformed every aspect of modern society, from communication and commerce to education and entertainment. However, this technological advancement has also opened the door to new forms of crime: cybercrime […]

A person wearing a hoodie, seen from behind, sits in front of two monitors in a dimly lit room. The screens display lines of code with text highlighted in red, suggesting advanced computing activity or potentially related to cybersecurity or hacking. The scene conveys an atmosphere of anonymity and concentration.

Cybercrimes in Spain: what they are, types, and regulations in the Penal Code

The digital revolution has transformed every aspect of modern society, from communication and commerce to education and entertainment.

However, this technological advance has also opened the door to new forms of crime: computer crimes or cybercrimes.

These illicit activities, committed through information and communication technologies (ICT), represent a growing threat to individuals, businesses and governments.

This article offers a comprehensive analysis of cybercrimes, highlighting their regulation in the Spanish Penal Code , European regulations and the most relevant international agreements.

In addition, it examines international cooperation in the fight against cybercrime and provides practical advice on how to prevent and protect against such crimes.


What are computer crimes?

Cybercrimes are illegal acts committed using ICTs as a means or end. In the context of cybersecurity in Spain , these criminal activities affect individuals, companies, and public bodies. These acts can include :

  • Attacks on computer systems: hacking, malware distribution, DDoS attacks.
  • Electronic frauds: phishing, carding, pharming.
  • Impersonation: online identity theft to commit fraud or defame.
  • Crimes against privacy: unauthorized access and dissemination of personal data.
  • Crimes against intellectual property: piracy of software, music, movies.

The complexity of these crimes lies in their ability to transcend borders, which poses challenges in terms of jurisdiction, legislation and international cooperation.

Furthermore, rapid technological evolution demands constant updating of legal regulations to effectively combat these cybersecurity threats and protect citizens against computer fraud.


Computer crimes in the Spanish Penal Code

The Penal Code has been subject to various legislative reforms to adapt to the evolution of computer crimes in Spain and to guarantee an effective response to these new forms of cybercrime.

The reforms of 2010 (Organic Law 5/2010) and 2015 (Organic Law 1/2015) introduced and updated specific articles to address these criminal behaviors.

The treatment of computer crime in the Spanish Penal Code covers everything from attacks on systems to electronic fraud, establishing sanctions proportionate to the seriousness of the acts.

Below is a detailed analysis of the main types of cybercrime contemplated in Spanish criminal law:


1. Illegal access to computer systems (Art. 197 bis)

One of the main cybercrimes in Spain is unauthorized access to information systems, defined in Article 197 bis of the Spanish Penal Code . Article 197 bis penalizes unauthorized access to protected computer systems, violating established security measures, or facilitating such access to third parties.

  • Criminal conduct sanctioned:
    • Unauthorized access to all or part of an information system.
    • Remain in an information system without the consent of the owner.
    • Intercept unauthorized computer data transmissions.
  • Feathers expected:
    • Prison from 6 months to 2 years.
    • Interception of data: Imprisonment from 3 months to 2 years or a fine of 3 to 12 months.

Related articles:

  • Illegal access through the production or facilitation of programs I Passwords to commit the above crimes (Art. 197 ter CP).

2. Production and distribution of malicious software (Art. 197 ter)

Article 197 ter penalizes the creation, acquisition, distribution or use of computer programs or passwords intended to commit crimes related to the unlawful access to systems or the interception of data.

  • Criminal conduct:
    • Creation or distribution of software designed to violate the security of computer systems.
    • Providing unauthorized passwords or access codes to facilitate the commission of computer crimes.
  • Feathers:
    • Imprisonment from 6 months to 2 years or a fine of 3 to 18 months.

Related articles:

  • La interception of computer data through artifice or technical means (Art. 197 bis 2 CP).
  • La permanence or facilitation of access to a computer system violating the security measures of this and against the will of its legitimate user (197 to 1 CP).

3. Discovery and revelation of secrets (Art 197)

Article 197 penalizes the appropriation, modification and dissemination of reserved data without consent, violating personal or family privacy.

  • Criminal conduct:
    • Appropriating emails, documents or private data without authorization.
    • Disseminate personal or family data without authorization.
  • Feathers:
    • Imprisonment from 1 to 4 years and a fine of 12 to 24 months.
    • If the data is sensitive or the victim is a minor, the penalty is imposed in the upper half.

Related articles:

  • La revelation of the secret in question (Art. 278.2 CP).
  • La dissemination, revelation or transfer of the secret performed by whoever has legal or contractual obligation to keep it (Art. 279 CP).

4. Computer fraud (Art 248)

Article 248 regulates the crime of fraud through the manipulation of computer systems to obtain an illicit economic benefit.

The schemes include unauthorized transfer of assets and fraudulent use of credit cards.

  • Criminal conduct:
    • Manipulation of computer systems to carry out non-consensual transfers.
    • Creation or use of computer programs intended to commit fraud.
    • Fraudulent use of credit or debit cards.
  • Feathers:
    • Prison sentence of 6 months to 3 years.
    • Penalties may be increased depending on the economic damage caused or if the crime is committed within the framework of a criminal organization.

5. Damage to computer systems (Art 264)

Article 264 penalizes the destruction, alteration or deletion of data, computer programs or electronic documents belonging to others without authorization, when the damage is serious.

  • Criminal conduct:
    • Delete, damage, deteriorate, alter or make inaccessible data or computer programs.
    • Destroy or alter foreign information systems.
  • Feathers:
    • Prison sentence of 6 months to 3 years.
    • If the damage is particularly serious or affects critical infrastructure, the penalty can be increased to up to 5 years in prison.

Related articles:

  • Obstruction or interruption of the operation of a computer system, (Art. 264 bis CP).
  • Production, acquisition or facilitation of programs (Art. 264 ter CP).
  • Providing passwords intended to commit any of the above crimes (Art. 400 CP).

6. Obstruction of computer systems (Art. 264 bis)

Article 264 bis punishes the obstruction or interruption of the operation of a computer system by means of the introduction of unauthorized data or alterations.

  • Criminal conduct:
    • Entering data or transmitting information to disrupt or block a computer system.
    • Destroy, damage or render useless another's information system.
  • Feathers:
    • Prison sentence of 6 months to 3 years.
    • If the crime affects critical infrastructure or seriously harms a company or public administration, the penalties may be more severe, up to 8 years in prison.

Related articles:

  • Erase, damage, deteriorate, alter, suppress or make inaccessible computer data (Art. 264 CP).
  • Production, acquisition or facilitation of programs (Art. 264 ter CP).
  • Providing passwords intended to commit any of the above crimes (Art. 400 CP).

7. Falsification of computer documents (Art 401)

Article 401 penalizes the falsification of civil status , which in the digital context translates into identity theft through the use of falsified documents or credentials.

Read article: Document forgery: what the law says and what penalties it entails
  • Criminal conduct:
    • Falsifying identities on documents or digital credentials.
    • Using false documents to carry out transactions or commit fraud.
  • Feathers:
    • Prison sentence of 6 months to 3 years.

Related articles:

There are more cybercrimes regulated in the Spanish Penal Code that have not been mentioned in this article.

These include conduct such as falsifying electronic documents, manipulating computer devices or distributing malicious software, among others.

For a more complete and detailed view of all the defined cybercrimes, it is recommended to consult the Spanish Penal Code directly or to go to a professional specializing in criminal law.


European legislation on cybercrime

La European Union has developed a comprehensive regulatory framework to combat Cybercrime, improve the ciberseguridad and protect the fundamental rights of its citizens in the digital environment.
These measures seek to harmonize national legislation, including that of Spain, in the face of the growth of Cybercrime and threats like the computer fraud.

Below are the main European directives, regulations, and agreements relevant to the fight against cybercrime.

Directive 2013/40/EU on attacks against information systems

Objective : To establish measures to combat attacks on information systems and to harmonize the legislation of the Member States in this matter.

  • Content: It establishes the classification of computer crimes, promotes cooperation between Member States and sets minimum penalties for crimes such as hacking and the distribution of malware.
  • Impact in Spain: Adaptation of the Criminal Code to comply with the requirements of the directive, strengthening legislation against cybercrime.

General Data Protection Regulation (GDPR) 2016/679

Objective : To protect personal data and guarantee the rights of individuals over their information in the digital age.

  • Content: Regulates the processing of personal data, establishing severe sanctions for unauthorized use.
  • Sanctions: Fines of up to 20 millones de euros or 4% of annual turnover.
  • Impact in Spain: It is complemented by the Organic Law 3 / 2018 Personal Data Protection and Guarantee of Digital Rights, which reinforces national regulations on data protection.

NIS 2 Directive (Directive (EU) 2022/2555 on measures for a high common level of cybersecurity)

Objective : To strengthen cybersecurity in the European Union by expanding the scope and tightening security obligations for public and private entities.

It replaces Directive 2016/1148 (NIS 1) to adapt to the increase and sophistication of computer crimes and cyber threats.

Content :

  • It expands the scope of application to more sectors, including essential services and medium-sized businesses in sectors such as health, energy, transportation, public administration or digital services.
  • It obliges the affected entities to:
    • Evaluate risks and apply technical and organizational measures ciberseguridad.
    • Report serious incidents within short and specific timeframes.
    • Cooperate with national and European authorities in incident prevention and response.

eIDAS Regulation (Regulation 910/2014 on Electronic Identification and Trust Services)

Objective : To guarantee the security and legal validity of electronic transactions in the EU through the use of electronic signatures and digital certificates.

  • Content: Regulates the use of electronic identities y electronic stamps to ensure security in digital transactions.
  • Social Impact: Strengthens the fight against fraud digital and identity theft.

International cooperation in the fight against cybercrime

Given the global nature of cybercrime, international cooperation is essential.

The Budapest Convention on Cybercrime is the main international treaty in this area, ratified by more than 80 countries, including Spain.

Budapest Convention on Cybercrime

Objective : To establish a common criminal policy to protect society against cybercrime through appropriate legislation and improved international cooperation.

  • Content: Defines computer crimes and establishes procedures for investigation and international cooperation in the prosecution of these crimes.
  • Impact in Spain: Spain has harmonised its legislation and actively participates in international cooperation against cybercrime.

Prevention and tips to protect yourself against cybercrime

Prevention is the best strategy to minimize the risk and impact of cybercrime.

Here are some practical recommendations:

  1. Strong passwords: Use robust combinations of letters, numbers and symbols.
  2. Regular updates: Keep systems and programs up to date.
  3. Caution with links and files: Avoid opening suspicious links or files.
  4. security software: Install antivirus and firewall.
  5. Backups: Perform periodic backups of data.
  6. Cybersecurity education: Stay informed about the latest threats.
  7. Using Secure Networks: Use VPN networks on public connections.
  8. Mobile device protection: Secure devices with passwords and security software.

Conclusion

The fight against cybercrime requires constant updating of regulations and close international cooperation.

The Spanish Penal Code, together with European regulations and international agreements, offers a robust framework for sanctioning such conduct.

Furthermore, prevention and awareness are fundamental to mitigating the risks posed by cybercrime.

Adopting appropriate security measures is essential for both individuals and companies, in an increasingly digitalized and vulnerable environment.

This article provides a comprehensive overview of the most important regulations and agreements, offering useful tools to understand and address the challenges of cybersecurity in the 21st century.


RRYP Global, expert criminal lawyers.

RRYP / Legal Intelligence

You may now need to understand this

One international issue often opens up others. Continue from here without having to rebuild the problem from scratch.

Understanding the framework

Concepts and sources behind this analysis

Some international disputes can only be properly understood when the relevant legal concepts and the rules that structure the problem are distinguished.

Legal institutions

Concepts that should be distinguished

RRYP explanations of the legal institutions that appear in these types of matters.

Normative Library

legal framework of reference

Instruments that may be relevant depending on the country, facts, and legal issue.

From information to practice

When the issue ceases to be theoretical

Related practice area

Learn about this practice →
Applied experience

A real related matter

Mar Gámez, Managing Partner and Legal Director of RRYP Global
Legal Department

Mar Gamez

Managing Partner · Legal Department · RRYP Global

Practicing lawyer ICAM No. 137.007
Loyola University Private International Law and Comparative Law
International internship Legal department for matters connected with different countries
Learn about his career and publications →
To raise an issue