
I used government apps for a month. I found this.
I didn't use them as a citizen. I didn't use them to do paperwork. I used them as a computer forensic expert forensic expert with professional experience, with the eye of an auditor, with the mentality of someone who looks for what they should not find.
And I found what I shouldn't have found.
Credentials transmitted in plain text. Sessions that did not expire for hours. API endpoints without authentication. Misconfigured SSL certificates. Personal data stored locally on the device without encryption. Taxpayer tax information accessible through parameter manipulation. And a recurring pattern that explains why all this happens: temporary contractors who develop the applications, deliver the product and disappear, leaving the code unmaintained, without updates and without anyone to respond when a vulnerability is discovered.
I'll document what I found. I will document them with the technical rigour and with the prudence required by responsible disclosure. I will not publish reproducible exploits. I will not publish specific endpoints that will allow someone to replicate the findings. I will document vulnerability patterns, risk categories and implications for the million Mexicans whose data are at stake.
Because what is at stake is not abstract. They are the tax data of millions of taxpayers. They are the medical records of millions of beneficiaries. They are the identity data of millions of citizens. And they are in applications that do not meet the minimum security standards that any serious private company requires of its developers.
Taxpayer who reads me: every time you open the SAT app on your phone, you trust your tax information to be protected. That article will tell you if that confidence's warranted.
IMSS beneficiary who reads me: every time you check your listed weeks or your medical history at the IMSS app, you trust that nobody else can see that information. That article will tell you if that confidence's warranted.
The methodology: what we did and what we didn't do
I need to be clear about the methodology because the line between security audit and unauthorized access is a line that in Mexico is defined by the Federal Penal Code, and respecting it is both a legal obligation and an ethical imperative.
What we did was analyze the Mexican government's mobile applications as users. We download the apps from the official Google Play and App Store stores. We install them on test devices. We use them with our own accounts -- real accounts of Duriva team members. We observe the behavior of the apps. We analyzed the network traffic they generated. We examined the data stored locally on the device. We review communications security settings.
What we didn't do was try to access government systems. We do not attempt to exploit vulnerabilities to gain unauthorized access. We do not attempt to access other users' data. We do not execute attacks against government infrastructure. We limited ourselves to observing what the apps did on our own devices, with our own data, from our own network.
That distinction is important. Everything I'm going to document was observed passively -- analyzing the apps' behavior as a user, not as an attacker. If what we passively observe is already worrying, what an active attacker could find is another dimension.
The tools we use are standard in mobile application security audits: an interception proxy to analyze network traffic (such as Burp Suite or mitmproxy), static analysis tools to examine the application code, and analysis tools for the device's local storage. All legal. Everything documented. All within the framework of a defensive security audit.
Finding 1: Transmission of sensitive data without proper encryption
This is basic. So basic that it is embarrassing to have to report it in 2026.
HTTPS -- the encrypted version of the HTTP protocol -- is the minimum standard for any web communication involving sensitive data. When you access your online bank, the connection is HTTPS. When you buy something on Amazon, the connection is HTTPS. When you sign in to your email, the connection is HTTPS. The TLS encryption provided by HTTPS is what prevents someone intercepting your network traffic from being able to read the content of the communication.
What we found in several government apps is that, although the primary connection was HTTPS, there were application components that made calls to endpoints in plain HTTP. Unencrypted. No TLS. In clear text.
What does that mean in practice? That if a user is connected to a public WiFi network -- at a coffee, at an airport, at a commercial place -- and opens one of these apps, an attacker on the same network can intercept some of the traffic and see information that's been transmitted. If that information includes access credentials, fiscal or personal data, the attacker has them.
But the problem goes beyond plain HTTP. Even on HTTPS connections, we encountered poor TLS configurations. Outdated versions of TLS (TLS 1.0 and 1.1, which are officially deprecated and have known vulnerabilities). Weak cipher suites that are susceptible to decryption attacks. And in some cases, the app did not properly validate the server's certificate -- making it vulnerable to man-in-the-middle attacks where an attacker presents a fake certificate and the app accepts it without complaint.
Certificate pinning -- the practice of the app only accepting the specific certificate from the government server, rejecting any others -- was not implemented in most of the apps we analyzed. Certificate pinning is a standard defense against man-in-the-middle in mobile applications. The banks implement it. The e-commerce apps implement it. Messaging apps implement it. The Mexican government apps, for the most part, do not.
Finding 2: Insecure local storage
When you install an app on your phone, the app stores data locally on the device. This is normal and necessary -- the app needs to save session tokens, user preferences, data caches to function offline, etc.
The problem is how that data is stored. On a mobile device, an app's data is protected by the operating system's sandbox -- in theory, only the app can access its own data. But if the device is compromised (rooted or jailbroken), if the user connects the device to a computer for backup, if malware gains elevated permissions, or if someone has physical access to the device, locally stored data is accessible.
Therefore, sensitive data that an app stores locally must be encrypted. Not only protected by the operating system sandbox. Encrypted with keys that are not hardcoded in the app code.
What we find in several government apps is the following:
Session Tokens stored in flat text
The session token is what tells the server "this user has already authenticated, don't ask for the password again." If an attacker obtains the session token, they can impersonate the user without needing to know their credentials. Session tokens must be stored in the iOS Keychain or Android KeyStore -- secure, encrypted stores designed specifically for this purpose. In several of the apps we analyzed, the tokens were in SharedPreferences (Android) or in unencrypted plist files (iOS).
Unencrypted cached personal data
When the app consults user information -- tax data in the case of the SAT, medical history in the case of the IMSS --, that information is stored in a local cache so that the next time the user consults it, it loads faster. That's understandable from a usability point of view. But if that cache contains detailed tax information, return history, health data, or identity information, and is stored unencrypted on the device's storage, it can be read by anyone with access to the device.
Debug logs with sensitive information
In several apps we found debug logs -- logs that developers use during development to diagnose errors -- that were not deleted before publishing the app. These logs contained URLs complete with parameters, server responses with user data, and, in some cases, plain text credentials or tokens. Debug logs are development tools. They should not exist in a production app. Its presence indicates that the app did not go through a security review process before being published.
Finding 3: Poor session management
Session management is one of the most critical aspects of application security. A poorly managed session allows an attacker to impersonate a legitimate user without knowing their credentials.
What we found:
Meetings that did not expire at reasonable times
In one of the apps we analyzed, the session remained active for more than 8 hours after the last interaction. That means that if a user opened the app at 9 a.m., checked their information, and didn't use the app again all day, the session was still active at 5 p.m. If someone took the user's phone at 4 in the afternoon -- a co-worker, a thief, a curious minor -- they could access all of the user's information without needing to authenticate.
Security best practices indicate that sessions for apps that handle sensitive information should expire after a short period of inactivity -- 5 to 15 minutes for financial and tax applications. 8 hours is an interval that is not justified for an app that handles tax information.
predictable session Tokens
In one of the apps, the session token had a sequential component that could be predicted. If a user's token was, for example, "SESSION-2024-00001234," the next token generated by the system was "SESSION-2024-00001235." An attacker who obtained his own token could attempt to predict another user's token simply by incrementing the number. Session tokens must be random, with enough entropy that they cannot be guessed or predicted. Using numerical sequences as session tokens is a first-semester engineering security mistake.
Lack of session invalidation on the server
When a user logs out of the app, the app should notify the server so that the server invalidates the session token. If the token is not invalidated on the server, an attacker who captured the token can continue to use it even after the user is logged out. In several of the apps we analyzed, we found that the logout was only local -- the app cleared the device token, but did not notify the server. The token was still valid on the server for hours.
Finding 4: Exposed API Endpoints
Modern mobile applications function as interfaces that communicate with servers through APIs (Application Programming Interfaces). The app displays the data; the API provides them. The security of the app depends, to a large extent, on the security of the API.
What we found when analyzing the traffic of government apps is that several of the APIs had serious problems:
Endpoints without authentication
We found API endpoints that returned information without requiring a valid session token. Not all of the information was sensitive -- some endpoints returned public catalogs, configuration data, etc. But some did return data that should not be accessible without authentication.
Insecure Direct Object References (IDOR)
This is a classic type of vulnerability where the API uses a direct identifier -- such as an RFC number, a CURP, or a social security number -- as a parameter to retrieve information. If the API does not verify that the authenticated user has the right to see the information associated with that identifier, an attacker can change the parameter and see another user's information.
To be clear: we are not attempting to exploit this vulnerability to access third-party data. What we found was that the structure of the URLs and the parameters of the APIs strongly suggested that authorization verification was poor or non-existent. A query parameter that was literally the taxpayer's RFC, without any additional authorization token verifying that the requester had the right to see that information, is a red flag.
Lack of rate limiting
APIs had no speed limits. An attacker could make thousands of requests per minute without being blocked. This facilitates brute force attacks against authentication mechanisms, enumeration of valid identifiers and mass data extraction.
Finding 5: The problem of temporary contractors
This finding is not technical. It is structural. And it is perhaps the most important of all because it explains why the four previous findings exist.
The vast majority of Mexican government applications are not developed by internal agency teams. They are developed by external contractors. Software development companies that win the bid, develop the application, deliver it and leave.
This model has fundamental security problems:
There is no continuity
The contractor who developed the v1.0 app is not necessarily the same one who develops v2.0. Knowledge of the code, of the architecture, of the design decisions, is lost with each change of contractor. And with that knowledge you also lose the safety considerations that (if they existed) the original contractor incorporated.
No security maintenance
Security vulnerabilities are discovered after deployment, not before. A library that was secure when the code was written may have a critical vulnerability discovered six months later. If there is no active team maintaining the code, that vulnerability is not patched. The app continues to operate with the vulnerability until someone -- an auditor, an attacker -- finds it.
Incentives are poorly aligned
The contractor has an incentive to deliver the app working, on time and on budget. Security is not usually an acceptance criterion with the same weight as functionality. If the app does what the requirement says it should do, the contractor gets paid and leaves. If the app has a SQL injection that allows access to the database, but the requirement did not say "must not have SQL injections," the contractor has no contractual responsibility.
No independent code review
In most government development projects I have seen -- and I have participated as forensic expert in litigation involving government software --, there is no independent security review of the code before delivery. There is no pentesting. There is no code audit. There is nothing to verify that the code the contractor delivered meets safety standards. Acceptance is based on functional testing: "the app does what we said it should do." Not in security tests: "the app is secure."
Contractor personnel turnover
The developers who write the code for government apps are employees of the contractor, not the government. When the contract ends, those developers move on to another project, with another client, in another industry. And they take with them knowledge of the code, architecture and, potentially, access credentials to the systems.
I have seen -- in expert reports that Duriva has conducted in litigation involving government software -- cases where former employees of contractors retained access to source code repositories of government applications months after the contract had ended. Not because they had hacked anything, but because no one revoked their access. Nobody knew they had access. No one kept an inventory of who had access to what.
Shared responsibility: government, contractors and citizens
This problem is not the fault of a single actor. It is a systemic failure with shared responsibilities.
The government It's responsible because it doesn't set mandatory cyber security standards for applications development. No pentoning required prior to deployment. No independent code revisions required. No regular safety audits are required. He has no internal equipment with technical capacity to verify that what his contractor gave up is secure. And she doesn't have a vulnerability outreach program that will allow outside researchers to report findings safely.
The contractors they are responsible because they deliver software with basic vulnerabilities that should not exist by 2026. Ground HTTP transmission. Tokens predictable. Unencrypted storage. Retirement logs in production. These aren't sophisticated mistakes. They are basic mistakes that any developers with minimum safety training should detect and correct. Their existence indicates that contractors do not have secure development processes (Secure SLLC), do not conduct code security revisions and do not prioritize user data protection.
The citizens We have limited but nonzero liability. We have to demand that our data be protected. We have to report vulnerabilities when we find them -- through secure channels with responsible outreach. And we have to be aware that government apps, as they are governmental, are not automatically secure. The national shield on the app icon isn't a guarantee of security. That's an icon.
Responsible disclosure: what we did with the findings
Duriva practices responsible disclosure. He always has. It always will.
The findings of this audit were reported to the corresponding agencies through available channels. They were provided with a detailed technical report with the description of each vulnerability, evidence of its existence, severity classification according to CVSS (Common Vulnerability Scoring System) and remediation recommendations.
I'll be honest about the leading outreach experience with government in Mexico: it's frustrating.
Government agencies do not, for the most part, have an established channel to receive vulnerability reports. They do not have an application security team that can evaluate the report. They do not have an incident response process that includes the evaluation of external reports. In practice, what we did was contact in multiple ways until we found someone who understood what we were talking about.
In some cases, we got a response. In others, silence. In no case did we obtain formal confirmation that the vulnerabilities had been remediated. Some findings we reported months ago are still present today. Others appear to have been corrected -- we check periodically, in the same passive way we originally found them.
The lack of a vulnerability disclosure program (VDP) in Mexican government agencies is a serious problem. In the United States, CISA requires federal agencies to have a VDP. It is a binding directive (BOD 20-01). Anyone who finds a vulnerability in a US government system has an official, safe and legally protected channel to report it. In Mexico, that does not exist. And that means that researchers who find vulnerabilities in government systems have three options: report them and risk being ignored (or worse, reported), publish them without reporting them (irresponsible), or keep quiet and let the vulnerabilities persist indefinitely.
Neither of those options are good. Mexico needs a federal VDP. Already.
What should be done
Mandatory secure development standards. Any government application -- web or mobile -- should be developed following a secure development life cycle (Secure SLLC). That includes: analysis of safety requirements, secure design, secure coding, static and dynamic safety tests prior to deployment and continuous after-deployment security maintenance. Those requirements should be in contracts with contractors. Not as a suggestion. A verifiable contractual obligation.
Independent security audit before deployment. No government app should be deployed without undergoing a security audit by a third party independent of the contractor who developed it. Pentesting. Code review. Configuration analysis. Data management evaluation. If the app does not pass the audit, it is not deployed.
Federal vulnerability outreach programme. An official channel, legally protected, run by CERT-MX or an equivalent entity, so that security researchers can report vulnerabilities to government systems without a legal risk. with response commitments at clear times. with transparency about the state of mediation.
Internal application security teams. Agencies that handle sensitive citizen data -- SAT, IMSS, ISSSTE, SEP, INE, Ministry of Health -- must have internal teams with the technical capacity to evaluate the security of the applications they operate. They cannot depend solely on the contractor for the safety of the product that the contractor delivered to them. It's like buying a lock and trusting that it works just because the locksmith said it works. You need someone else to test it.
Contractor access management. Every access granted to a contractor -- to code repositories, to servers, to databases, to development environments, to any system -- must be inventoried and must be formally revoked upon termination of the contract. Not the next day. Not "when we remember." At the time of termination of the contract. With independent verification that the revocation was effective.
What every person reading this needs to know
Taxpayer who uses the SAT app: use the app with caution. Don't use it on public WiFi networks. Closed your login manually every time you finish using it -- don't just close the app, close the login inside the app. Use a unique password for your SAT account that you do not use at any other service. It activates authentication of two factors if available. And regularly review your tax data to detect unauthorized activity.
Entitlement who uses the IMSS app: The same precautions apply. Your medical history's sensitive information. I shouldn't be accessible to an uncipher cache on your phone. But she can be. Keep your phone up to date with the latest version of the operating system, use biometrics or robust pIN and do not lend your phone.
Developer working on government projects: implements HTTPS in all communications with no exceptions. Use pinning certification. Stores tokens and sensitive data at Keychain / KeyStore. It implements session expires at reasonable times. Valids authorisation at every endpoint of the API. Eliminates purge logs before posting. Do these things not because the contract requires you -- probably doesn't require them -- but because the data from millions of Mexicans depend on your code.
Government official responsible for technology: The apps that your dependence operates are the interface between the government and millions of citizens. The security of these apps is data security for these citizens. And security cannot be achieved by requiring the contractor to sign a confidentiality clause. It is achieved with verifiable technical standards, independent audits and internal equipment with the ability to evaluate what the contractor delivers.
I used government apps for a month. What I found isn't sophisticated. They aren't zero-day vulnerabilities that require intelligence equipment to discover. That's basic mistakes. First half computer security errors. Errors that any private company would be -- a bench, a fintech, a e-commerce -- would detect and correct before throwing them to the public.
But government apps don't go through the same filters as private sector apps. They don't have the same level of scrutiny. They do not have the same level of demand. And they don't have the same level of consequences when they fail.
When a bank has a vulnerability in its app, the insurer puts pressure on it, the regulator sanctions it, customers leave. There are market consequences. When a government app has a vulnerability, nothing happens. The citizen cannot "go" to another SAT. You cannot "change" IMSS. You are a captive user of a service that you did not choose and that you cannot leave.
And that's exactly what should force the government to be more picky with the security of its apps, no less. Because the citizen has no choice. And whoever doesn't have a choice deserves at least that his data be protected with the standards that today's technology allows.
During my professional career auditing systems. I have audited banks. I have audited corporations. I have audited hospitals. I have audited law firms. I have audited everyone. And the findings on government apps aren't the worst I've seen -- I've seen worse at private companies. But they are the most worrying. Because they affect more people. Because the data is more sensitive. And because the citizen who trusts them has no alternative.
That mandatory trust should come with a mandatory security guarantee. Today, that guarantee does not exist.

