Skip to content

Instantly share code, notes, and snippets.

@pdehaan
Created May 26, 2023 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pdehaan/68e588b41180c821e96eca2f979191cf to your computer and use it in GitHub Desktop.
Save pdehaan/68e588b41180c821e96eca2f979191cf to your computer and use it in GitHub Desktop.
haveibeenpwned breach stats
DATA CLASS BREACH COUNT (674) BREACH PERCENT TOTAL PWN COUNT
Email addresses 668 99% 12,550,581,668
Passwords 528 78% 8,129,073,504
Usernames 356 53% 3,848,673,897
Names 321 48% 6,419,053,031
IP addresses 289 43% 3,127,783,590
Phone numbers 202 30% 4,054,006,665
Dates of birth 179 27% 3,115,021,728
Physical addresses 158 23% 2,489,450,219
Genders 133 20% 3,264,501,447
Geographic locations 93 14% 3,592,797,077
Website activity 77 11% 283,619,438
Social media profiles 39 6% 1,719,672,485
Purchases 38 6% 82,362,537
Private messages 33 5% 8,622,952
Employers 25 4% 2,318,823,886
Job titles 25 4% 2,036,643,612
Browser user agent details 22 3% 71,343,748
Partial credit card data 21 3% 58,466,604
Spoken languages 17 3% 728,968,487
Marital statuses 15 2% 183,891,659
Security questions and answers 13 2% 53,085,584
Income levels 12 2% 221,587,573
Device information 12 2% 99,447,993
Government issued IDs 12 2% 12,984,311
Salutations 11 2% 155,415,256
Education levels 10 1% 311,065,452
Auth tokens 9 1% 70,051,344
Payment histories 9 1% 40,946,678
Bios 8 1% 308,293,073
Ethnicities 8 1% 224,492,880
Religions 8 1% 191,716,926
Sexual orientations 8 1% 103,182,830
Physical attributes 8 1% 57,343,145
Avatars 8 1% 26,932,524
Email messages 8 1% 11,723,845
Account balances 8 1% 10,424,372
Instant messenger identities 8 1% 2,827,558
Family structure 7 1% 173,151,212
Profile photos 7 1% 42,714,590
Nationalities 7 1% 17,875,206
Bank account numbers 7 1% 16,230,155
Occupations 6 1% 164,031,819
Social security numbers 6 1% 18,026,437
Credit cards 6 1% 9,047,526
Vehicle details 6 1% 8,012,930
Passport numbers 6 1% 2,927,833
User website URLs 5 1% 270,209,736
Credit status information 5 1% 159,421,560
Home ownership statuses 5 1% 150,308,804
Drinking habits 5 1% 54,950,708
Smoking habits 5 1% 39,055,839
Personal health data 5 1% 12,969,847
Job applications 5 1% 4,810,633
Historical passwords 5 1% 4,702,776
Social connections 5 1% 3,692,955
Partial dates of birth 5 1% 2,301,507
Time zones 5 1% 1,945,839
Relationship statuses 4 1% 564,647,393
Family members' names 4 1% 5,756,788
Personal descriptions 3 0% 29,465,733
Chat logs 3 0% 1,161,922
Age groups 3 0% 759,074
Net worths 2 0% 139,753,895
Financial investments 2 0% 139,753,895
Personal interests 2 0% 132,677,852
Sexual fetishes 2 0% 68,160,667
Political views 2 0% 51,320,868
IMSI numbers 2 0% 40,919,997
Drug habits 2 0% 28,815,732
Survey results 2 0% 24,460,893
Nicknames 2 0% 23,956,494
IMEI numbers 2 0% 20,624,169
Health insurance information 2 0% 11,820,066
Credit card CVV 2 0% 8,104,977
Partial phone numbers 2 0% 6,831,367
PINs 2 0% 5,122,675
Loan information 2 0% 2,631,379
Ages 2 0% 1,336,754
Homepage URLs 2 0% 1,264,321
Financial transactions 2 0% 532,919
SMS messages 2 0% 100,130
Password hints 1 0% 152,445,165
Work habits 1 0% 27,393,015
Travel habits 1 0% 27,393,015
Parenting plans 1 0% 27,393,015
Fitness levels 1 0% 27,393,015
Astrological signs 1 0% 27,393,015
Licence plates 1 0% 20,949,825
Cellular network names 1 0% 20,580,060
Apps installed on devices 1 0% 20,580,060
Address book contacts 1 0% 20,580,060
Login histories 1 0% 20,339,937
Device serial numbers 1 0% 20,339,937
Political donations 1 0% 8,176,132
Charitable donations 1 0% 8,176,132
Buying preferences 1 0% 8,176,132
Purchasing habits 1 0% 7,196,890
Password strengths 1 0% 5,814,988
Races 1 0% 3,867,997
Driver's licenses 1 0% 2,743,539
Appointments 1 0% 2,660,295
Payment methods 1 0% 2,424,784
Deceased statuses 1 0% 2,257,930
Recovery email addresses 1 0% 1,476,783
Flights taken 1 0% 1,460,130
Mnemonic phrases 1 0% 1,408,078
Encrypted keys 1 0% 1,408,078
Eating habits 1 0% 1,383,759
Delivery instructions 1 0% 1,117,405
HIV statuses 1 0% 1,107,034
Car ownership statuses 1 0% 1,100,089
Beauty ratings 1 0% 1,100,089
Years of professional experience 1 0% 1,073,164
Professional skills 1 0% 1,073,164
Spouses names 1 0% 768,890
Places of birth 1 0% 768,890
Mothers maiden names 1 0% 768,890
Living costs 1 0% 768,890
Device usage tracking data 1 0% 699,793
School grades (class levels) 1 0% 542,902
Taxation records 1 0% 471,167
Biometric data 1 0% 228,605
User statuses 1 0% 149,830
MAC addresses 1 0% 139,395
Customer interactions 1 0% 139,395
Customer feedback 1 0% 88,678
Utility bills 1 0% 81,830
Deceased date 1 0% 81,830
Employment statuses 1 0% 49,681
Photos 1 0% 44,109
Browsing histories 1 0% 44,109
Audio recordings 1 0% 44,109
Career levels 1 0% 36,789
Support tickets 1 0% 26,815
Vehicle identification numbers (VINs) 1 0% 20,032
Reward program balances 1 0% 2,239
#!/usr/bin/env node
import CachedFetch from "@11ty/eleventy-fetch";
import _sortBy from "lodash.sortby";
const breaches = await getBreaches();
const dataClassMap = new Map();
for (const b of breaches) {
for (const dc of b.DataClasses) {
const arr = dataClassMap.get(dc) || [];
arr.push(b.PwnCount);
dataClassMap.set(dc, arr);
}
}
const data = [];
for (const [dataClass, pwnCountArr] of dataClassMap) {
data.push({
dataClass,
count: pwnCountArr.length,
percent: pwnCountArr.length / breaches.length,
sum: arrSum(pwnCountArr),
});
}
console.log(`DATA CLASS | BREACH COUNT (${breaches.length}) | BREACH PERCENT | TOTAL PWN COUNT\n:----|----:|----:|----:|`);
const sorted = _sortBy(data, ["percent", "count", "sum"]).reverse();
for (const b of sorted) {
console.log(`${b.dataClass} | ${b.count} | ${numFormat(b.percent, "percent")} | ${numFormat(b.sum)}`);
}
function numFormat(value, style="decimal") {
return new Intl.NumberFormat("en-US", {
style,
}).format(value);
}
function arrSum(arr = []) {
return arr.reduce((sum, item) => sum + item);
}
async function getBreaches() {
return CachedFetch("https://haveibeenpwned.com/api/v3/breaches", { type: "json", duration: "6h" });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment