An investigation into the theft of the personal information of nearly every adult in Bulgaria led to the arrest of a 20-year-old computer programmer, the police announced Wednesday, in connection with a breach that underscores the vulnerability of vast troves of digitized information.

The authorities acknowledged that Bulgaria’s national tax agency was hacked after a news outlet received an email on Monday with a taunt and a claim of responsibility. The names, addresses, incomes and social security information of as many as five million Bulgarians and foreign residents — in a country of only seven million — had been taken.

“The state of your cybersecurity is a parody,” the self-proclaimed hacker emailed.

Though the police cautioned that the investigation was in its early stages, some officials suggested that Russia might have been behind the attack, as retaliation for the country’s recent purchase of American-made fighter jets. A lawyer for the suspect denied he played any role in the breach.

Regardless of who perpetrated the hack, experts said the breach highlighted the ever-growing danger faced by both governments and their citizens in an increasingly digitized world.