Case study

Poland: a SQL injection in medical software and up to 5 million records

A classic bug in a clinic software vendor's web app. A database export nobody stopped. Weeks before anyone noticed.

Editorial photo for the article

SQL injection is one of the oldest web vulnerabilities there is. It has been on OWASP lists for two decades, and every modern framework offers a safe way to avoid it. In August 2026 it was still enough to take the patient database of a Polish medical software vendor.

This case study covers what has been reported about the Qbusoft Medyc breach, our analysis of the attack path, and what testing would have caught. Facts are linked to their sources. Our reasoning is labelled as analysis.

What happened

Qbusoft makes Medyc, software used by medical clinics in Poland. According to Help Net Security's report:

  • An attacker exploited a SQL injection flaw in the application interface.
  • On 22 and 23 August 2026, an encrypted archive of the database was exported.
  • The export commands had no time limit, so a long-running export could complete.
  • PESEL numbers, Poland's national identification numbers, were stored encrypted, but in a form that could easily be decrypted.
  • The breach was detected on 8 and 9 September, and the company issued a statement on 25 September.
  • Exposed data included names, PESEL numbers, addresses, phone numbers and email addresses. Media reports cited by Poland's data protection authority, UODO, put the number of people affected at up to 5 million.
  • Poland's digital affairs minister, Krzysztof Gawkowski, said CERT Polska had not been notified. UODO ordered an audit. Qbusoft said it fixed the vulnerability the same day it was found.

Source: Help Net Security, 29 September 2026

It was not Poland's only large health-data breach that summer. In August 2026, attackers took data from the MyDr medical platform in what was described as the theft of 19 million patients' data.

Source: Notes from Poland, 13 August 2026

Timeline

  1. 22 to 23 August 2026

    Database archive exported through the SQL injection.

  2. 8 to 9 September

    Breach detected, about two weeks later.

  3. Same day as discovery

    Vulnerability fixed, according to Qbusoft.

  4. 25 September

    Public statement.

The likely attack path

Our analysis, based on the reported facts. We have not seen the Medyc code or infrastructure.

1. Finding the injection point

SQL injection happens when user input is pasted into a database query as text instead of being passed as a parameter. An attacker finds it by sending characters such as a single quote in each parameter and watching for errors or changes in the response. Automated tools have done this for years; AI agents now do it while also understanding the application, for example by working out which fields reach a search or report query.

2. From reading rows to exporting the database

The reporting says export commands were used and had no time limit. That suggests the attacker did not just read records through the injected query, but triggered or abused a database export feature. With no timeout and no size limit, one request could produce a full archive.

3. Weak encryption at rest

Encrypting PESEL numbers was the right idea. If the key or method made them "easily decryptable", as reported, the encryption added little once the database was out. Encryption only helps if the key is not reachable by the same path that reaches the data.

4. Two weeks without detection

A full database export from an application server is unusual traffic. It ran for two days and was found more than two weeks later.

What testing would have caught

Our analysis. SQL injection is one of the first things any web application penetration test checks, and one of the easiest to prove. A competent test of the Medyc interface would be expected to find:

  • The injection itself. Testers send injection payloads to every parameter, including those in API calls, report filters, sort orders and export options, which are often written by hand and less carefully reviewed.
  • The unbounded export. Testing resource limits (OWASP API4) means asking: what is the biggest thing one request can make this server do? An export with no time limit is a finding even without the injection.
  • Weak protection of identifiers. White-box or configuration review can show where encryption keys live and whether a compromised application can decrypt everything.
  • Missing detection. Large data pulls during a test window that nobody notices tell you your monitoring would not notice an attacker either.

Healthcare software vendors are a particular risk because one vendor's flaw affects many clinics at once. The clinics, not the vendor, usually hold the legal duty for patient data. Under NIS2's supply chain rule, Article 21(2)(d), health-sector entities in scope are expected to manage that risk, which in practice means asking vendors for recent test evidence.

Source: NIS2 Article 21

Lessons for smaller companies

  1. Use parameterised queries everywhere, including in reports, filters, exports and admin tools. The main screens are usually fine; the edges are where old patterns survive.
  2. Put limits on exports: size, time, frequency and who may run them. Log every export.
  3. Keep encryption keys away from the application's normal database access. If the app can decrypt everything, so can anyone who controls the app.
  4. Alert on volume. A database export at night from an application account should wake someone up.
  5. If you sell software to regulated customers, test it and share the evidence. Your customers carry the legal risk of your bugs, and they will increasingly ask.

The lesson is not that SQL injection is back. It never left. Old bugs survive in the parts of an application that nobody tests, and automated attackers test all of it. For more on health-data apps, see our healthtech page.

Frequently asked questions

What is SQL injection?

A vulnerability where user input is inserted into a database query as text, letting an attacker change the query. It is prevented by using parameterised queries.

How many people were affected by the Medyc breach?

Media reports cited by Poland's data protection authority put the number at up to 5 million people.

Why do health software vendors matter so much?

One vendor's flaw can expose patient data from many clinics at once, while the clinics usually carry the legal responsibility for that data.

See what an attacker would find in your app

Our AI agents attack your web app or API with your permission, prove each finding with a working exploit, and senior pentesters review and sign the report.

15-minute call

Talk to our team

A 15-minute call about your app, your deadline and what your auditor, insurer or customer needs to see.