To find stored card data, you scan every place your business keeps information, including laptops, file shares, databases, email, cloud storage, logs and backups, with a tool that looks for 13 to 19 digit numbers that pass the Luhn checksum card numbers use, then confirm each hit by hand and either delete it or move it somewhere protected. Under PCI DSS version 4.0.1 this is no longer optional good practice: every merchant has to confirm where account data lives at least once a year, and since 31 March 2025 every business must also have a plan ready for when card numbers turn up somewhere they should not be.
Key takeaways
- Card numbers almost always leak into places nobody planned: spreadsheets, email, support tickets, call notes, debug logs and backups.
- Discovery tools match number patterns, check them with the Luhn algorithm and look for nearby keywords, but every hit still needs a human to confirm it.
- Free tools such as ccsrch and PANhunt cover single machines and file shares; cloud platforms have built-in scanners for their own storage.
- PCI DSS 4.0.1 requires annual scope confirmation for merchants and six-monthly confirmation for service providers.
- Since 31 March 2025, finding a card number where it is not expected must trigger a documented incident response, not just a quiet delete.
Why card data ends up where it should not
Almost no business sets out to store card numbers in the wrong place. It happens through ordinary work: a sales rep types a phone order into a spreadsheet, a customer emails their card details asking for a refund, a developer switches on verbose logging to chase a bug, or a support agent pastes a full card number into a ticket so a colleague can see it. Each one is a copy of cardholder data outside the systems that were designed and assessed to protect it.
That matters because the PCI Data Security Standard applies to every system that stores, processes or transmits card data. A single forgotten spreadsheet on a shared drive can pull that drive, the network it sits on and every user with access into scope. It is also where breaches get worse than they need to be. Attackers who get into a network look for exactly these stray files, and the history of card breaches, from the Heartland and Hannaford attacks onward, shows that what was stored matters as much as how the intruder got in.
Where does stored card data usually hide?
In practice, discovery scans turn up card data in the same handful of places again and again. Start your search here.
- Spreadsheets and documents on laptops and shared drives, especially anything used for phone or mail orders, refunds or chargeback paperwork.
- Email inboxes and archives, including PST files and shared mailboxes where customers send card details unprompted.
- Support, CRM and ticketing systems, in free-text fields, notes and attachments.
- Application and web server logs, debug output and crash dumps that captured full request data.
- Databases, in comment or notes columns, old tables from retired systems and copies restored into test environments.
- Cloud storage buckets holding exports, reports or data lake files.
- Backups and archives, which preserve every mistake above long after the live copy was deleted.
- Chat tools, where staff share details to get a task done quickly.
- Scanned paper forms and call recordings, which need image or speech-to-text processing before any pattern scan can see them.
Track data and security codes deserve special attention. The full magnetic stripe or chip data, card verification codes and PIN blocks are sensitive authentication data, and PCI DSS does not allow them to be kept after a transaction is authorized, even if encrypted. If you are unsure what a PIN block is or why it is treated so strictly, our explainer on PIN block formats covers it.
How do card data discovery tools work?
Discovery tools all follow the same basic logic, with differences in how much they can read and how well they cut down false alarms.
- Read the content. The tool opens files, emails, database rows or cloud objects, unpacking ZIP archives and Office formats so the text inside can be checked.
- Match number patterns. It looks for runs of 13 to 19 digits, including ones broken up by spaces or dashes, in the shapes card brands use.
- Check the Luhn digit. Every genuine card number ends in a check digit calculated with the Luhn algorithm, so random numbers that fail the test are discarded.
- Check issuer ranges and context. Better tools compare the first digits against known card brand ranges and look for nearby keywords such as "card number" or "expiry" to raise confidence.
- Report and mask. Results list the location of each hit with the number masked, so the report itself does not become a new copy of card data.
Even with all of that, false positives are normal. Order references, tracking numbers and long database IDs sometimes pass a Luhn check by chance, and every brand publishes test card numbers that show up in developer files. Microsoft's own credit card detection rule looks for 14 to 19 digits that must pass the Luhn test and deliberately skips reserved testing numbers, which shows how much tuning goes into getting a usable result.
Which tools can you use to find card numbers?
The right tool depends on where your data lives and how big your estate is. A small merchant can get a long way with free tools; a large organization with cloud platforms and hundreds of endpoints usually needs a managed product.
| Tool | Type | Best for | Limits |
|---|---|---|---|
| ccsrch | Free, open source, command line | Scanning a single machine or file system for card numbers and track data | Little ongoing development; contiguous numbers only |
| PANhunt | Free, open source | Windows and Linux drives, Office files, ZIP archives and PST email files | Pattern-based; needs manual review of results |
| Amazon Macie | Cloud service | Card numbers and stripe data in Amazon S3 storage | Only covers S3; billed by data scanned |
| Google Cloud Sensitive Data Protection | Cloud service | Card numbers across Google Cloud storage and databases | Google Cloud only |
| Microsoft Purview | Cloud and on-premises | Email, SharePoint, OneDrive and file shares in Microsoft 365 estates | License-dependent features |
| Commercial discovery suites | Paid products | Enterprise-wide scheduled scanning with reporting for assessors | Cost and deployment effort |
Of the free tools, ccsrch is the long-running cross-platform scanner, and it can ignore a supplied list of test card numbers. PANhunt, built by security firm Dionach for checking PCI DSS scope, looks for Visa, Mastercard and American Express numbers in Word, Excel, text, XML and PST files, searches ZIP files recursively and produces a report of masked PANs. In the cloud, Amazon Macie's financial identifiers cover credit card numbers, expiration dates and magnetic stripe data, with separate detectors for numbers that appear with and without a nearby keyword.
How to run a card data discovery exercise, step by step
A one-off scan finds today's problems. A repeatable process is what keeps them from coming back, and it is what an assessor will want to see.
- List every storage location you can think of, using the hiding places above, and ask each team where they keep customer information.
- Pick tools for each location: an endpoint scanner for laptops and file shares, the native scanner for each cloud platform, and database queries for structured data.
- Load test card numbers into an ignore list so developer test data does not drown out real findings.
- Run the scans with an account that can read everything, otherwise unreadable folders become blind spots.
- Triage every hit by hand, confirming whether it is a real card number and whether it belongs to a customer.
- Treat confirmed finds as incidents under your response plan: record them, work out how the data got there, then delete it securely or move it into your protected environment.
- Fix the cause, whether that is a form, a log setting, a script or a habit, so the same data does not reappear next month.
- Repeat on a schedule and after any significant change, and keep the reports as evidence for your annual scope confirmation.
A worked example: a small online shop with phone orders
Consider a hypothetical online retailer with 12 staff that takes most payments through a hosted checkout page but also accepts orders by phone. The owner believes no card data is stored, because the website never sees card numbers.
A scan of the office file share and four laptops with a free scanner returns 214 hits. After removing test numbers and obvious false positives such as order IDs, 37 are genuine card numbers: 29 in an "orders backlog" spreadsheet the phone team used when the card terminal was down, six in customer emails in a shared inbox, and two in a PDF of a chargeback dispute. None of these were in scope when the business filled in its self-assessment.
The fix took less time than the scan. The spreadsheet and emails were securely deleted, the backup copies were found and purged, staff were given a written fallback process that keys phone payments straight into the payment provider's virtual terminal, and an auto-reply was added to the shared inbox telling customers never to email card details. A repeat scan a month later came back clean.
What PCI DSS 4.0.1 now requires
PCI DSS 4.0.1 turned scope confirmation into a formal, tested requirement. Under requirement 12.5.2, merchants must document and confirm their PCI DSS scope at least once every 12 months and after any significant change, including identifying every location where account data is stored, processed or transmitted. As the PCI guidance summarized by Crowe puts it, management, not only the assessor, now owns that scoping process, yet the standard does not prescribe a method for finding the data, which is where discovery scanning comes in.
Service providers face a tighter cycle. Requirement 12.5.2.1 asks them to repeat the scoping exercise at least every six months. And requirement 12.10.7, which became mandatory on 31 March 2025 along with the rest of version 4.0's future-dated requirements, says incident response procedures must be ready to start whenever stored PAN is detected anywhere it is not expected.
Where things stand in November 2026
As of November 2026, PCI DSS 4.0.1 is the only version that can be assessed against. Version 3.2.1 was retired on 31 March 2024, version 4.0 on 31 December 2024, and every one of the requirements that were best practice during the transition has been mandatory since 31 March 2025. The old Payment Application Best Practices program that the original version of this page referred to became PA-DSS, which has itself since been replaced by the PCI Secure Software Standard.
The next major revision is already under way. The PCI Security Standards Council ran a request-for-comments period on the next PCI DSS draft from 8 June to 20 July 2026, and its published timeline points to further comment rounds before a new version is released, likely in 2027 or 2028. Nothing announced so far suggests scope confirmation will become any less demanding.
What to watch next
Watch the Council's draft of the next PCI DSS for any change to scoping and discovery expectations, and watch your cloud providers' detectors, which are updated as card number ranges and formats change. Keep an eye on new places data can leak too: AI assistants and transcription tools that store call recordings or chat histories can capture card numbers as easily as a spreadsheet can. Businesses that reduce what they hold in the first place, through hosted payment pages and tokenization, have the least to find. Card networks also rely on this discipline when they trace fraud back to a source, a process explained in our guide to common point of purchase investigations.
Frequently asked questions
Is data discovery scanning a PCI DSS requirement?
PCI DSS does not name a specific tool or method, but it requires you to identify every location where account data is stored and to confirm that scope at least once a year. In practice, scanning is the most reliable way to prove that to yourself and to an assessor.
Are free tools good enough?
For a small business with a few machines and a shared drive, free scanners such as ccsrch or PANhunt can find most stray card data if someone reviews the results carefully. Larger estates with cloud storage, databases and many endpoints usually need scheduled, centrally managed scanning.
What should I do if I find card numbers?
Treat it as an incident: record what was found and where, find out how it got there, securely delete it or move it into your protected environment, check backups for copies and fix the process that caused it. Since 31 March 2025, PCI DSS expects documented procedures for exactly this situation.
Do masked or truncated card numbers count?
A card number masked to show no more than the first six and last four digits is generally not treated as full cardholder data, but full numbers, even in internal systems, are. Track data, security codes and PIN blocks must not be stored at all after authorization.
How often should we scan?
At minimum, before each annual scope confirmation and after any significant change to systems or processes. Many businesses scan quarterly or monthly so problems are caught long before an assessment.