A frequent question in compliance teams and among data protection officers is whether the LGPD, Brazil's General Data Protection Law, requires companies to run pentests. The law does not use the word, but it demands two things that lead to the test: protecting personal data against unauthorized access (Art. 46) and being able to demonstrate that this protection works (Art. 6, X). For technical measures, a pentest is the most direct way to make that demonstration, because it checks the protection by attempting, in a controlled and authorized way, precisely the access the law requires preventing.
This article shows what Art. 46 asks for, why the most common checks are not enough to prove that controls are effective, where the result of a pentest carries weight in an incident or an inspection and how to define the scope of the test based on risk. Our reading here is technical: we deal with security and how it is verified in systems. Questions of legal interpretation specific to each company belong with its legal counsel.
What does Art. 46 of the LGPD ask for?
Art. 46 requires controllers and processors to adopt security measures, both technical and administrative, capable of protecting personal data. The text of Law No. 13,709/2018 reads (free translation):
Processing agents must adopt security, technical and administrative measures capable of protecting personal data from unauthorized access and from accidental or unlawful situations of destruction, loss, alteration, communication or any form of inappropriate or unlawful processing.
Technical and administrative measures
Technical measures act on the systems that hold the data: access control, encryption, event logging, application security. Administrative measures act on the organization: security policy, contracts with processors, training, processes. In the chapter "Segurança da informação e vazamento de dados" (Information security and data leaks) of the book Tratado de Proteção de Dados Pessoais, Fabiano Menke and Guilherme Goulart note that "the security expected is not applied exactly to the data itself, but to the systems that hold it (technical measures) and to the general environment of the institution (organizational measures)".
The criterion of "capable" measures
The law is not satisfied with the mere existence of a measure. It requires the measure to be capable of protecting that data in that processing. Art. 44 points the same way by considering irregular any processing that does not provide the security the data subject can expect, taking into account how it is carried out, the expected risks and the techniques available at the time. Paragraph 2 of Art. 46 adds that the measures apply from the design of the product or service, and Art. 47 extends the duty to anyone who takes part in the processing, including suppliers.
What the law does not define
The law does not list which measures to adopt. Paragraph 1 of Art. 46 delegates to the ANPD, Brazil's data protection authority, the definition of minimum technical standards, and that regulation has not yet been published: the topic is on the 2025-2026 Regulatory Agenda, approved by CD/ANPD Resolution No. 23/2024, and was kept in the December 2025 update.
The most concrete official reference so far is the Guidance on Information Security for Small Processing Agents (in Portuguese), version 1.0, from October 2021. In it, vulnerability management comes down to applying updates and patches and keeping antivirus software. The guide does not mention pentesting. We analyzed this document in episode #295 of Segurança Legal (in Portuguese).
The law, therefore, defines the expected result and leaves the method open. Whoever chooses the method needs to be able to show that it works.
How does a company prove that its technical measures work?
By testing the controls against what the law requires avoiding: unauthorized access. The most widely used checks answer different questions, and only one of them actually attempts that access.
- Policy and documentation. They show which controls the company says it has. They do not show whether those controls work in the systems.
- Updates and patches. They are what the ANPD guide asks for. They close flaws already known and fixed by vendors, but they do not reach flaws in systems the company developed itself, which have no vendor patch.
- Automated scanning. It identifies vulnerable versions and known insecure configurations. It does not understand the application's business rules or its access control.
- Pentest. It checks whether an attacker can, in practice, access, alter or extract personal data, and through which path. The limit is the scope and date of the test: whatever was left out or changed afterwards is not covered.
A common example shows the difference. An application that lets one customer view another customer's record just by changing an identifier in the request has no outdated version for a scanner to flag and no vendor patch to apply. The flaw lies in the system's logic and only shows up when someone attempts the improper access. That is exactly the exposure Art. 46 describes. The difference between scanning and pentesting was the topic of episode #278 of Segurança Legal (in Portuguese).
The test modality also matters. For applications, we recommend white box pentesting, with access to the code and to valid accounts, because it covers more of the system in the same testing time. The reasons are in Black box or white box pentest: which modality to choose.
The question, then, is not whether the law mentions pentesting. It is how the company would prove, without testing, that the systems holding personal data withstand an attack.
What does a pentest show from the LGPD perspective?
A pentest report shows which access paths to personal data were open, how easily they could be exploited and what was fixed. For LGPD compliance, however, technical severity alone is not enough, because it does not say which flaw puts more data subjects at risk.
In the pentests we carry out, each vulnerability found receives, in addition to its technical severity rating (CWSS for applications and APIs, CVSS for infrastructure), an analysis of the degree of harm to personal data protection under the LGPD. The practical effect is prioritization: a flaw of medium technical severity that exposes health data may need fixing before a high-severity flaw in a system with no personal data.
The pentest covers the technical part of Art. 46. The administrative part and the law's other obligations, such as legal basis, minimization and retention, depend on LGPD compliance work.
Where does the pentest result carry weight in incidents and inspections?
It carries weight at the moments when the LGPD demands proof of security measures, which are usually the incident and the sanctioning proceeding. The law works with accountability, and several provisions require the company to demonstrate what it was doing to protect the data.
- Accountability (Art. 6, X). The company must demonstrate the adoption of effective measures and their effectiveness. A dated report, with findings, fixes and retest, is that kind of demonstration.
- Liability for damage (Art. 44, sole paragraph). Whoever failed to adopt the measures of Art. 46 and caused the incident is liable for the damage. The testing history shows that the system was assessed and the flaws addressed.
- Incident notification (Art. 48, paragraph 1, III). The notice to the ANPD and to data subjects must state the technical and security measures used.
- System structure (Art. 49). Systems must be structured to meet security requirements and good practices. The test checks whether the structure withstands attacks.
- Governance program (Art. 50, paragraph 2, I, "h"). The program must be updated based on continuous monitoring and periodic assessments, and periodic tests are one of those assessments.
- Setting the penalty (Art. 52, paragraph 1, VIII and IX). The repeated and demonstrated adoption of secure processing mechanisms and good practices counts.
ANPD decisions on security follow this logic. In the proceeding against the São Paulo State Public Servants' Assistance Institute (IAMSPE), concluded in October 2023, the warning for violating Art. 49 came with the obligation to present a schedule of actions to reduce the vulnerability of its systems. The Santa Catarina State Health Department was sanctioned the same month for violating Arts. 48 and 49. In the proceeding against the Ministry of Health (PAS No. 00261.001882/2022-73), the ANPD's investigation found that the ministry had not demonstrated adopting adequate security measures. In all three cases, the authority's question was the same: what the organization was doing to protect the data and whether it could prove it.
How to define the scope of a pentest based on risk?
By the same criterion the law uses to measure security measures: the nature of the data, the characteristics of the processing and the severity of the possible harm. Paragraph 1 of Art. 46 highlights sensitive personal data, and paragraph 1 of Art. 50 requires considering the nature, scope, purpose, likelihood and severity of the risks. Five questions usually define the first cycle well:
- Which systems process sensitive or financial personal data? The record of processing operations (Art. 37) typically answers this.
- Which are exposed to the internet? Portals, apps and public APIs concentrate most of the risk of unauthorized access.
- Which connect the company to processors and partners? Integration APIs widen the attack surface, and Art. 47 extends the security duty to whoever takes part in the processing.
- What has changed since the last test? A significant change in a system can reopen what was fixed.
- Is the company subject to a sector regulation? If so, frequency and minimum requirements are already set by the regulation.
The LGPD does not set a frequency. The regulations that do adopt an annual cycle with an additional test after significant change, a reasonable reference for those without a sector obligation. Systems that change often call for shorter cycles, as we discuss in Point-in-time vs. continuous pentesting. And paragraph 2 of Art. 46, by speaking of security from the design stage, points to testing before the system goes into production; the topic comes up in episode #270 of Segurança Legal (in Portuguese).
The test only becomes complete evidence when the cycle closes: finding, fix and retest. A report with critical vulnerabilities left open for months shows that the company knew the risk and did not act, the opposite of what Art. 6, X, requires.
Frequently asked questions
My company is small. Does pentesting still make sense for the LGPD?
The duty in Art. 46 applies regardless of size, and the ANPD guide for small businesses does not waive protection against unauthorized access. If the company runs an internet-facing application with customer data, a pentest of that application is the way to know whether it is protected, with a scope proportional to the size of the system.
Does a vulnerability scan meet Art. 46?
It helps, but it is not enough to prove the effectiveness of an application's controls. A scan finds known software and configuration flaws; it does not test access control or business rules, which is where the flaws that expose personal data in in-house systems usually are.
How often should a pentest be run?
The LGPD does not say. As a reference, Brazil's Central Bank requires penetration testing at least annually for financial institutions, and PCI DSS requires testing at least every 12 months and after significant changes in the environment.
Does a pentest report serve as evidence for the ANPD?
It serves as evidence that the technical controls of certain systems were tested, on a defined date and scope. It carries more weight when accompanied by the record of fixes and retest, and it does not replace the demonstration of administrative measures.
Does the supplier that operates the systems also need to test?
Art. 46 applies to controllers and processors, and Art. 47 extends the security duty to whoever takes part in the processing. Requiring periodic pentests and access to the results in the contract with the processor is one way for the controller to monitor that duty.
Related service: Pentest
BrownPipe has worked in information security and data protection since 2012. We perform pentests on web applications, APIs, infrastructure and mobile, offer Pentest as a Service and support companies in technical LGPD compliance.
If you need to know which vulnerabilities in your systems expose personal data and the degree of harm of each one under the LGPD, we can discuss the scope of a pentest on WhatsApp +55 55 99978-8211.