Legal Protection For Ethical Hackers
LEGAL PROTECTION FOR ETHICAL HACKERS: DETAILED LEGAL EXPLANATION WITH CASE LAWS
1. Introduction
Ethical hacking refers to the authorised examination of computer systems, networks, applications, databases, and digital infrastructure to identify security weaknesses before malicious individuals can exploit them.
Ethical hackers, also known as white-hat hackers, use technical methods similar to those employed by cybercriminals. However, their activities are undertaken for legitimate purposes, including cybersecurity testing, vulnerability identification, penetration testing, security auditing, and responsible vulnerability disclosure.
Despite their legitimate objectives, ethical hackers may face legal risks when their activities involve accessing computer systems, examining confidential information, testing security controls, or identifying vulnerabilities in third-party infrastructure.
The central legal issue is the distinction between authorised security testing and unauthorised access.
In Spain and the European Union, ethical hackers receive legal protection through criminal law, data protection legislation, cybersecurity regulations, contractual arrangements, whistleblower protections, and intellectual property legislation.
However, there is no universal legal immunity for ethical hackers. Their protection depends substantially on the existence and scope of authorisation, compliance with agreed testing conditions, proportionality, and the handling of personal and confidential information.
2. Legal Framework Governing Ethical Hacking in Spain
The legal protection of ethical hackers in Spain arises from several legislative instruments.
A. Spanish Criminal Code – Organic Law 10/1995
The Spanish Criminal Code is particularly important because ethical hacking activities may involve conduct that resembles criminal offences when performed without appropriate authorisation.
Article 197 – Discovery and Disclosure of Secrets
Article 197 addresses unlawful conduct involving the discovery and disclosure of secrets and the unauthorised access or acquisition of confidential information in circumstances covered by the provision.
Its relevance to ethical hackers arises where security testing involves accessing private communications, confidential files, personal information, or protected databases.
An ethical hacker operating within an authorised penetration-testing agreement may have a legitimate basis for accessing specified systems and information.
However, authorisation to test a network does not automatically permit unrestricted access to private communications or unrelated personal information.
Article 197 bis – Unauthorised Access to Computer Systems
Article 197 bis is one of the most important provisions concerning ethical hacking.
It criminalises, subject to the statutory requirements, unauthorised access to all or part of an information system by infringing security measures and without being duly authorised.
The provision also addresses certain forms of interception of non-public transmissions of computer data.
For ethical hackers, this creates a fundamental legal distinction:
Authorised penetration testing may constitute legitimate cybersecurity activity.
Access exceeding the permission granted may create criminal exposure.
Circumventing security measures without the required authorisation may constitute an offence.
Continuing access after permission has been withdrawn may create additional legal risks.
Written permission from the system owner is therefore an essential safeguard.
Article 197 ter – Tools and Information Used for Certain Cyber Offences
Article 197 ter addresses specified conduct involving the production, acquisition, importation, or facilitation of devices, programmes, passwords, or access codes intended for the commission of offences covered by the relevant provisions.
Security professionals should therefore distinguish legitimate dual-use cybersecurity tools from their unlawful use or provision for criminal purposes.
The possession or use of penetration-testing software is not automatically criminal. Its purpose, circumstances, and relationship to the statutory elements of the offence must be examined.
Article 264 – Computer Damage
Article 264 criminalises certain conduct involving the deletion, damaging, deterioration, alteration, or suppression of computer data, programmes, or electronic documents, subject to the statutory requirements.
Ethical hackers may face legal exposure where testing causes:
Loss of business data.
System interruption.
Corruption of databases.
Destruction of files.
Unauthorised modification of applications.
Serious disruption of business operations.
A penetration-testing authorisation should therefore clearly specify whether destructive testing, stress testing, or denial-of-service simulations are permitted.
Article 264 bis – Serious Interference with Information Systems
This provision addresses certain forms of serious interference with information systems.
Ethical hackers must avoid activities that cause prohibited system disruption, particularly where testing involves critical infrastructure, essential services, or systems supporting financial institutions.
Article 31 bis – Corporate Criminal Liability
Article 31 bis establishes circumstances in which legal entities may incur criminal liability for offences committed in their name or on their behalf and for their direct or indirect benefit, subject to the statutory requirements.
This is relevant to cybersecurity companies employing ethical hackers.
A company may need effective compliance systems, internal controls, risk assessments, and appropriate supervision to prevent unlawful testing activities by its employees or contractors.
3. Authorisation as the Principal Legal Protection
Authorisation is the foundation of lawful ethical hacking.
A person may possess advanced cybersecurity qualifications and act with good intentions, but those circumstances alone do not provide legal permission to access another person's systems.
Authorisation should be obtained from the person or organisation legally entitled to permit the testing.
A proper authorisation document should identify:
The organisation authorising the testing.
The systems and networks covered.
The IP addresses and domains included.
The testing period.
The permitted techniques.
The prohibited activities.
Data access restrictions.
Vulnerability reporting procedures.
Emergency contact details.
Liability allocation.
Confidentiality obligations.
Procedures for stopping testing.
Importance of Written Authorisation
Written authorisation provides evidence that the ethical hacker was acting within an agreed cybersecurity engagement.
For example, a Spanish bank may authorise a cybersecurity firm to test its online banking application.
The agreement may permit authentication testing, vulnerability scanning, and controlled exploitation of specified test environments.
However, if the ethical hacker accesses an unrelated third-party payment platform or extracts customer information beyond the agreed scope, the original authorisation may not protect that conduct.
4. EU Convention on Cybercrime – Budapest Convention
The Convention on Cybercrime, commonly known as the Budapest Convention, is an important international instrument governing cybercrime.
Spain is a party to the Convention.
The Convention establishes a framework for addressing cyber offences and international cooperation.
Important provisions include:
Article 2 – Illegal Access
Article 2 addresses intentional access to the whole or part of a computer system without right.
This provision is particularly relevant to ethical hacking because it distinguishes lawful access from access without right.
Article 3 – Illegal Interception
Article 3 addresses intentional interception without right of non-public transmissions of computer data.
Ethical hackers should therefore avoid intercepting communications outside the authorised testing environment.
Article 4 – Data Interference
Article 4 addresses intentional damage, deletion, deterioration, alteration, or suppression of computer data without right.
Article 5 – System Interference
Article 5 concerns intentional serious hindering of the functioning of computer systems without right.
Article 6 – Misuse of Devices
Article 6 addresses specified misuse of devices, programmes, passwords, and access codes.
The Convention is particularly significant because it provides an international legal foundation for distinguishing authorised cybersecurity activity from criminal interference.
It does not, however, provide blanket immunity to ethical hackers.
5. Legal Protection Under the GDPR
The General Data Protection Regulation (GDPR), Regulation (EU) 2016/679, is highly relevant to ethical hacking.
Penetration testing frequently involves examining databases, authentication records, user accounts, employee information, and other personal data.
Even where the objective is cybersecurity improvement, the processing of personal data must comply with applicable data protection requirements.
A. Article 5 – Principles Relating to Personal Data Processing
Article 5 establishes fundamental principles, including:
Lawfulness.
Fairness.
Transparency.
Purpose limitation.
Data minimisation.
Accuracy.
Storage limitation.
Integrity and confidentiality.
Accountability.
Ethical hackers should access only the personal information necessary for the authorised security assessment.
B. Article 6 – Lawfulness of Processing
Article 6 establishes the lawful bases for processing personal data.
Where a cybersecurity organisation processes personal information on behalf of a customer, the relevant controller must identify an appropriate lawful basis.
The fact that testing has been authorised by a company does not independently resolve every GDPR requirement.
C. Article 28 – Processor Obligations
Where an ethical hacking company acts as a processor, Article 28 requires an appropriate contractual arrangement with the controller.
The agreement should address:
Subject matter of processing.
Duration of processing.
Nature and purpose of processing.
Types of personal data.
Categories of data subjects.
Confidentiality.
Security measures.
Subprocessor arrangements.
Assistance with data subject rights.
Return or deletion of personal data.
D. Article 32 – Security of Processing
Article 32 requires appropriate technical and organisational security measures.
Ethical hackers contribute to compliance by identifying vulnerabilities that may compromise confidentiality, integrity, or availability.
However, they must also protect any information obtained during testing.
E. Article 82 – Right to Compensation
Article 82 establishes a right to compensation for individuals who suffer material or non-material damage resulting from an infringement of GDPR.
An ethical hacker who unlawfully discloses personal information may face civil liability where the applicable requirements are established.
Conversely, a cybersecurity provider may rely on contractual and legal rights to seek recovery from a responsible organisation where the organisation's conduct causes compensable damage.
6. Protection Under the NIS2 Directive
Directive (EU) 2022/2555, known as the NIS2 Directive, strengthens cybersecurity requirements for essential and important entities.
It covers sectors including:
Energy.
Transport.
Banking.
Financial market infrastructure.
Healthcare.
Digital infrastructure.
ICT service management.
Public administration.
Other designated sectors.
NIS2 promotes a stronger cybersecurity environment through risk management, incident reporting, governance, and supervisory mechanisms.
Ethical hackers can support compliance by identifying technical vulnerabilities and testing the effectiveness of security controls.
Article 21 – Cybersecurity Risk Management Measures
Article 21 requires covered entities to adopt appropriate and proportionate technical, operational, and organisational measures.
These include vulnerability handling and disclosure, incident management, business continuity, and security in supply chains.
Ethical hacking can contribute directly to these objectives.
Article 23 – Reporting Obligations
Article 23 establishes incident-reporting requirements for covered entities.
Security testing may help identify weaknesses before they result in reportable incidents.
However, the ethical hacker must follow the agreed incident-escalation and disclosure procedures.
NIS2 should not be interpreted as creating general criminal immunity for individuals conducting security research.
7. Legal Protection Under the Digital Operational Resilience Act (DORA)
The Digital Operational Resilience Act, Regulation (EU) 2022/2554, is particularly important for ethical hackers working with Spanish financial institutions.
DORA applies to specified financial entities and addresses ICT risk management, incident reporting, operational resilience testing, and ICT third-party risk.
A. Article 5 – Governance and Organisation
Financial entities must establish governance and control arrangements for ICT risk management.
Ethical hacking can help management assess whether security arrangements operate effectively.
B. Article 6 – ICT Risk Management Framework
Financial entities must maintain an ICT risk management framework.
Security assessments and penetration tests can contribute to the identification and management of ICT vulnerabilities.
C. Articles 24–27 – Digital Operational Resilience Testing
These provisions establish requirements concerning digital operational resilience testing.
They include testing programmes and advanced testing arrangements, including threat-led penetration testing (TLPT) under the relevant framework.
Ethical hackers may participate in such testing where properly selected, authorised, and supervised.
D. Article 26 – Advanced Testing
Article 26 addresses advanced testing based on threat intelligence.
Such testing may involve controlled simulations of real-world cyberattack techniques.
The testing must be conducted in accordance with applicable regulatory and technical requirements.
E. Article 27 – Requirements for Testers
Article 27 establishes requirements concerning testers conducting advanced testing.
These include appropriate expertise, organisational independence, and the prevention of conflicts of interest.
This is particularly important because ethical hackers involved in financial-sector testing may receive access to highly sensitive banking infrastructure.
8. Responsible Vulnerability Disclosure and Legal Protection
Responsible vulnerability disclosure is a process through which security researchers report vulnerabilities to the affected organisation before making the information public.
A responsible disclosure process normally involves:
Identifying a vulnerability.
Collecting limited evidence.
Avoiding unnecessary access to personal data.
Reporting the vulnerability privately.
Providing technical details.
Allowing a reasonable remediation period.
Coordinating public disclosure where appropriate.
Coordinated Vulnerability Disclosure
The researcher and affected organisation cooperate to resolve the vulnerability while reducing the risk of exploitation.
This process is encouraged by modern European cybersecurity policy.
Legal Limitations
Responsible disclosure does not automatically legalise unauthorised access.
A researcher who accesses a system without permission cannot necessarily avoid criminal liability simply by reporting the vulnerability afterwards.
The strongest protection exists where the researcher operates under a formally recognised vulnerability disclosure policy or explicit authorisation.
9. Whistleblower Protection for Cybersecurity Researchers
Spain's Law 2/2023 regulates the protection of persons reporting regulatory infringements and corruption.
It establishes internal and external reporting mechanisms and protection against retaliation in circumstances covered by the legislation.
This may be relevant where an ethical hacker discovers serious regulatory violations, corruption, or other reportable misconduct during legitimate professional activities.
The legislation may protect qualifying reporting persons against:
Dismissal.
Demotion.
Intimidation.
Harassment.
Discrimination.
Other forms of retaliation.
However, ordinary vulnerability disclosure is not automatically protected under Law 2/2023.
The reported information must fall within the substantive scope of the legislation, and the reporting person must satisfy the applicable conditions.
10. Protection Under Spanish Trade Secrets Law
Law 1/2019 on Trade Secrets is relevant when ethical hackers access confidential technical information during cybersecurity testing.
Trade secrets may include:
Source code.
Proprietary algorithms.
Internal security architecture.
Commercial databases.
Technical documentation.
Confidential system configurations.
The legislation protects trade secrets against unlawful acquisition, use, and disclosure.
However, the statutory framework recognises certain lawful forms of obtaining information, including independent discovery and qualifying activities involving testing, studying, disassembling, or observing publicly available or lawfully possessed products, subject to the statutory requirements.
Ethical hackers should therefore:
Maintain confidentiality.
Avoid unnecessary copying.
Restrict access to authorised personnel.
Avoid public disclosure of proprietary information without a lawful basis.
Securely delete information when required.
11. Intellectual Property Protection for Ethical Hackers
Ethical hackers frequently develop original cybersecurity tools, scripts, software, testing frameworks, and vulnerability assessment methodologies.
Their intellectual property rights may be protected under Spanish intellectual property legislation, particularly the consolidated Intellectual Property Law approved by Royal Legislative Decree 1/1996.
Computer programs may receive copyright protection where the statutory requirements are satisfied.
Important considerations include:
Ownership of original software.
Ownership of independently developed testing tools.
Contractual licensing arrangements.
Employment-related software development.
Confidentiality of proprietary techniques.
Protection of source code.
Restrictions on reverse engineering.
Under Article 97 of the Intellectual Property Law, special rules apply to the authorship and ownership of computer programs created by employees in the course of their duties.
An ethical hacker should therefore clarify intellectual property ownership before commencing a commercial security engagement.
12. Employment Law Protection for Ethical Hackers
Ethical hackers employed by cybersecurity companies or financial institutions may receive protection under Spanish employment legislation.
The principal framework is the Workers' Statute, approved by Royal Legislative Decree 2/2015.
Relevant protections include:
Protection against unlawful dismissal.
Occupational health and safety.
Working-time protections.
Confidentiality arrangements.
Employment-related intellectual property rules.
Protection against workplace discrimination.
An employer should establish clear internal procedures governing cybersecurity testing.
Employees should not be expected to perform unauthorised security testing merely because management informally requests it.
Written instructions and properly defined testing authority are particularly important where critical systems are involved.
13. Important Judicial Decisions and Case Laws
There is no single Spanish Supreme Court judgment establishing a comprehensive immunity regime for ethical hackers.
Nevertheless, several European and international decisions provide important legal principles concerning cybersecurity testing, computer access, data protection, and digital privacy.
A. Van Buren v. United States, 593 U.S. 374 (2021)
Court: Supreme Court of the United States.
Subject: Unauthorised access to computer information.
A police officer accessed a law-enforcement database for an improper purpose despite having authorised access to the database.
The US Supreme Court interpreted the Computer Fraud and Abuse Act and examined the distinction between accessing information one is authorised to obtain and obtaining information from prohibited areas.
Legal significance:
Access restrictions are important in determining computer-access liability.
The scope of authorised access requires careful examination.
Misuse of information and unauthorised access are not necessarily identical legal concepts.
Organisations should clearly define access permissions.
This judgment is useful for comparative analysis of ethical hacking but does not govern Spanish criminal law.
B. hiQ Labs, Inc. v. LinkedIn Corp., 31 F.4th 1180 (9th Cir. 2022)
Court: United States Court of Appeals for the Ninth Circuit.
Subject: Access to publicly available online information.
The dispute concerned the collection of publicly available information from LinkedIn.
The court examined the application of US computer-access legislation to scraping publicly accessible information.
Legal significance:
The decision illustrates the importance of distinguishing publicly accessible information from information protected by technical access restrictions.
However, it does not establish a general right to scrape websites or conduct penetration testing without permission.
It is a comparative US authority rather than binding Spanish or EU law.
C. R v. Gold and Schifreen [1988] AC 1063
Court: House of Lords, United Kingdom.
Subject: Unauthorised computer access.
The defendants accessed a computer system using unauthorised credentials.
The case exposed limitations in the criminal law then applicable to computer misuse and contributed to the development of specialised computer crime legislation in the United Kingdom.
Legal significance:
Computer access requires an appropriate legal framework.
The absence of conventional physical damage does not eliminate the need for specific computer-access offences.
Cybersecurity activity must be distinguished from unauthorised system access.
The decision is historically important but has no binding authority in Spain.
D. CJEU – Case C-582/14, Patrick Breyer v Bundesrepublik Deutschland (2016)
Subject: Dynamic IP addresses and personal data.
The CJEU examined whether dynamic IP addresses could constitute personal data in circumstances where additional information was available to identify the user.
Legal significance:
Ethical hackers frequently examine IP addresses, server logs, authentication records, and network identifiers.
The decision demonstrates that technical identifiers may constitute personal data depending on the circumstances.
Security researchers must therefore consider GDPR requirements when collecting or retaining technical information.
E. CJEU – Case C-311/18, Data Protection Commissioner v Facebook Ireland and Maximillian Schrems (Schrems II), 2020
Subject: International transfer of personal data.
The CJEU examined the legal framework governing international personal data transfers.
Legal significance:
Ethical hacking engagements involving international security teams, cloud infrastructure, and cross-border access to personal information must consider the applicable GDPR transfer requirements.
The decision is relevant to international cybersecurity operations, particularly where testing information is transferred outside the European Economic Area.
F. CJEU – Case C-203/22, Dun & Bradstreet Austria, 27 February 2025
Subject: Transparency and automated decision-making under GDPR.
The Court examined transparency requirements relating to automated decision-making and the information that must be provided to data subjects.
Legal significance:
The decision illustrates the importance of meaningful transparency where complex technological systems process personal data.
It may be relevant to ethical hackers assessing algorithmic systems and automated decision-making infrastructure.
It is not a direct ruling on the criminal liability or immunity of ethical hackers.
G. CJEU – Case C-300/21, Österreichische Post AG, 4 May 2023
Subject: Compensation for GDPR infringements.
The Court clarified the conditions for compensation under Article 82 GDPR.
It held that an infringement alone does not automatically establish entitlement to compensation. Damage and a causal link must also be established.
Legal significance:
Ethical hackers and cybersecurity companies may face civil liability if unlawful testing or disclosure results in compensable damage.
Conversely, the judgment helps establish the legal requirements for individuals seeking compensation following data protection infringements.
H. CJEU – Case C-340/21, Natsionalna agentsia za prihodite, 14 December 2023
Subject: Cybersecurity and personal data breaches.
The case concerned the unauthorised disclosure of personal data following a cyberattack.
The CJEU examined the security obligations of controllers and the conditions under which compensation may be claimed.
Legal significance:
Controllers must implement appropriate security measures.
Cyberattacks do not automatically establish that the controller failed to comply with GDPR.
Security measures must be assessed against the relevant risks.
The decision reinforces the importance of cybersecurity testing and risk management.
It is particularly relevant to ethical hackers assessing the security of public institutions, financial institutions, and private organisations.
Case-law qualification: The above judgments are not all direct ethical-hacking cases. They provide comparative and supporting principles concerning access restrictions, privacy, cybersecurity, and liability. The Spanish Criminal Code remains the primary authority for determining whether particular hacking conduct constitutes a criminal offence in Spain.
14. Ethical Hacking in Banking and Financial Institutions
Ethical hacking has particular importance in banking because financial institutions operate highly sensitive digital infrastructure.
Examples include:
Online banking platforms.
Mobile payment applications.
Payment processing systems.
Customer databases.
ATM networks.
Digital identity verification.
Anti-money laundering systems.
Core banking infrastructure.
Spanish financial institutions must comply with applicable cybersecurity and operational resilience requirements.
DORA is especially significant because it requires financial entities to maintain effective ICT risk-management and digital operational resilience arrangements.
Ethical hackers may conduct:
Network penetration testing.
Application security testing.
Authentication testing.
API security assessments.
Vulnerability scanning.
Controlled social engineering tests.
Threat-led penetration testing.
Cloud security assessments.
Testing must be properly authorised and controlled.
A security researcher should never assume that a bank's general interest in cybersecurity authorises independent access to its live banking systems.
15. Bug Bounty Programmes and Legal Protection
A bug bounty programme allows an organisation to invite security researchers to identify and report vulnerabilities in exchange for financial rewards or other recognition.
A properly structured bug bounty programme can provide an important basis for authorised security research.
It should contain:
A. Defined Scope
The organisation must specify the systems, domains, applications, and infrastructure included.
B. Permitted Testing
The policy should identify which testing techniques are allowed.
C. Prohibited Activities
Common restrictions include:
Denial-of-service attacks.
Social engineering.
Physical intrusion.
Accessing unrelated customer accounts.
Destructive testing.
Unnecessary extraction of personal information.
D. Safe Harbour Provisions
A safe harbour clause may state that the organisation will not pursue specified legal claims against researchers who act in good faith and comply with the programme's rules.
However, such a clause cannot bind prosecutors, third-party system owners, regulators, or individuals whose rights are affected.
It cannot override mandatory criminal law.
E. Responsible Disclosure
The policy should establish how researchers report vulnerabilities and how the organisation coordinates remediation.
16. Liability and Insurance Protection for Ethical Hackers
Professional ethical hackers may face financial claims arising from errors, negligence, or accidental system disruption.
Appropriate insurance arrangements can reduce these risks.
A. Professional Indemnity Insurance
Professional indemnity insurance may cover specified claims arising from professional negligence, errors, or omissions.
B. Cyber Liability Insurance
Cyber insurance may provide protection for certain cybersecurity incidents and associated financial losses, subject to policy terms.
C. Public Liability Insurance
This may cover certain third-party injury or property damage claims arising from professional activities.
D. Contractual Indemnity
Cybersecurity firms may negotiate indemnity arrangements with customers to allocate responsibility for losses arising from specified circumstances.
However, indemnity provisions cannot eliminate criminal responsibility or override mandatory legal obligations.
17. Legal Risks Faced by Ethical Hackers
Despite their legitimate objectives, ethical hackers may encounter the following risks:
1. Testing Outside Authorised Scope
Accessing systems beyond the agreed scope may create criminal and civil liability.
2. Unauthorised Data Extraction
Downloading personal or confidential information unnecessarily may violate data protection and confidentiality requirements.
3. Service Disruption
Testing that interrupts business operations may result in damages and potential criminal liability.
4. Disclosure of Vulnerabilities
Publishing sensitive technical information without following lawful disclosure procedures may create legal exposure.
5. Third-Party Infrastructure
Permission from one organisation does not automatically authorise access to systems belonging to another organisation.
6. Employee Misconduct
Employees must follow internal authorisation and security policies.
7. Cross-Border Testing
Different jurisdictions may impose different computer-access, privacy, and cybersecurity requirements.
18. Best Practices for Legal Protection of Ethical Hackers
Ethical hackers should adopt a structured legal compliance process.
Obtain written authorisation before testing.
Verify that the authorising party has legal authority over the systems.
Define the precise scope of testing.
Maintain written records of permission.
Avoid accessing unnecessary personal information.
Do not modify or delete production data without express permission.
Establish emergency stopping procedures.
Encrypt and securely store testing evidence.
Follow responsible vulnerability disclosure procedures.
Maintain confidentiality agreements.
Obtain appropriate professional insurance.
Document all testing activities.
Report critical vulnerabilities immediately through agreed channels.
Delete or return sensitive data as contractually required.
Obtain fresh authorisation before extending testing activities.
19. Illustrative Ethical Hacking Authorisation Agreement
The following is an illustrative contractual provision suitable for adaptation to Spanish law.
AUTHORISED SECURITY TESTING AND SAFE HARBOUR CLAUSE
"The Organisation expressly authorises the Security Researcher to conduct cybersecurity testing on the systems, applications, networks, and digital infrastructure specifically identified in the agreed testing scope.
The Security Researcher shall conduct testing solely for the purpose of identifying, verifying, and reporting security vulnerabilities.
The authorisation shall remain valid only during the agreed testing period and shall be limited to the systems and activities expressly identified in the written authorisation.
The Security Researcher shall not intentionally access, disclose, modify, delete, or extract personal or confidential information beyond what is reasonably necessary for the authorised security assessment.
The Security Researcher shall immediately notify the Organisation of any critical vulnerability or accidental system disruption.
Where the Security Researcher acts in good faith, complies with the agreed scope, and follows the applicable disclosure procedures, the Organisation shall not pursue contractual claims solely because of the authorised testing activities, except where liability arises from fraud, intentional misconduct, gross negligence, or other circumstances that cannot lawfully be excluded.
Nothing in this Agreement shall be interpreted as granting permission to access systems belonging to third parties or as excluding mandatory statutory obligations under Spanish law or applicable European Union legislation."
20. Future Developments in Legal Protection for Ethical Hackers
The legal framework for ethical hacking is evolving as cybersecurity becomes increasingly important.
Several developments are particularly significant.
A. Cyber Resilience Act
Regulation (EU) 2024/2847, known as the Cyber Resilience Act, establishes cybersecurity requirements for products with digital elements.
Its framework includes vulnerability handling and security-related obligations.
These requirements may increase the demand for professional security research and vulnerability assessments.
B. European Cybersecurity Certification Framework
The EU Cybersecurity Act, Regulation (EU) 2019/881, establishes the European cybersecurity certification framework.
It contributes to cybersecurity assurance and trust in digital products and services.
C. Artificial Intelligence Security
Ethical hackers increasingly examine AI systems for:
Prompt injection.
Data leakage.
Model manipulation.
Insecure integrations.
Unauthorised access.
Adversarial attacks.
Such activities must be conducted within appropriate authorisation and data protection frameworks.
D. Coordinated Vulnerability Disclosure
European cybersecurity policy increasingly recognises the importance of coordinated vulnerability disclosure.
Greater clarity concerning authorisation, safe harbour arrangements, and responsible disclosure may strengthen the legal environment for legitimate security researchers.
However, a comprehensive EU-wide criminal immunity for ethical hackers does not currently exist.
21. Conclusion
Legal protection for ethical hackers is essential for developing a secure digital economy and encouraging responsible cybersecurity research.
In Spain, the principal legal framework includes the Spanish Criminal Code, particularly Articles 197, 197 bis, 197 ter, 264, and 264 bis; the GDPR; Law 2/2023; Law 1/2019 on Trade Secrets; and applicable EU cybersecurity legislation.
The Budapest Convention provides an important international framework for distinguishing unlawful computer access from legitimate authorised activity.
DORA and NIS2 further strengthen the role of authorised security testing in protecting financial institutions and essential digital infrastructure.
Judicial decisions such as Van Buren, hiQ Labs, Breyer, Schrems II, Österreichische Post, and Natsionalna agentsia za prihodite provide useful comparative and supporting principles concerning computer access, privacy, cybersecurity, and digital liability.
Ultimately, the strongest legal protection for an ethical hacker comes from clearly documented authorisation, strictly defined testing boundaries, responsible vulnerability disclosure, compliance with data protection requirements, and appropriate contractual safeguards.
Ethical intentions alone do not create legal immunity. The decisive factors are lawful authority, the scope of permitted conduct, and compliance with applicable legal obligations.

comments