Chapter 1. Origins of PCI DSS and the data it protects.
PCI DSS (Payment Card Industry Data Security Standard) is the global security standard for payment card data. It is not a law but a contractual obligation. The card networks (Visa, Mastercard, Amex, Discover, JCB) impose it, through acquiring banks and PSPs, on every entity that stores, processes, or transmits card data, from a bakery’s kiosk to the largest e-commerce players. The standard is published and maintained by the PCI Security Standards Council (PCI SSC), founded in 2006 by the five networks to unify their separate security programs.
Two data categories: CHD and SAD
The standard distinguishes two categories. The first is cardholder data (CHD), which may be stored under strict conditions. Storing sensitive authentication data (SAD) after authorization is prohibited under all circumstances, even if encrypted.
| Data | Category | Storage after authorization |
|---|---|---|
| PAN (card number) | CHD | Permitted, but must be rendered unreadable per 3.5.1 (truncation, keyed hashing, tokenization, or strong cryptography) |
| Cardholder name | CHD | Permitted, if protected |
| Expiration date | CHD | Permitted, if protected |
| Service code (track data) | CHD | Permitted, if protected |
| Full track or chip data | SAD | Prohibited |
| CVV2 / CVC2 / CAV2 / CID (card security code) | SAD | Prohibited |
| PIN / PIN block | SAD | Prohibited |
PCI DSS works alongside legal frameworks but does not replace them. A PAN leak is almost always also a personal data breach under the GDPR. The competent supervisory authority, the CNIL in France, must then be notified within 72 hours. Critical European operators must also comply with NIS2. PCI compliance does not exempt you from any legal obligation, and non-compliance found at the time of a compromise always makes the bill bigger.
Chapter 2. Scope: the CDE, connected systems, and segmentation.
The CDE (cardholder data environment) comprises the people, processes, and technologies that store, process, or transmit CHD or SAD. PCI DSS scope does not stop at the CDE. It also includes systems connected to the CDE and systems that can affect its security, even if they never see a PAN. Overlooking them remains the most common scoping error, and the costliest one in an audit.
- In the CDE: payment servers, databases storing PANs, card terminals and POI devices, POS software, contact center call recorders, network traffic carrying CHD.
- Same network segment: any component that shares an unfiltered segment with the CDE is de facto in scope, even if it never touches card data.
- Connected systems: directory services (Active Directory), DNS, NTP, patch servers, centralized antivirus, monitoring, backups. They “talk” to the CDE.
- Security-impacting systems: administrative jump hosts, hypervisors hosting CDE virtual machines, orchestrators, CI/CD pipelines that deploy payment code, secrets management tools.
- Third parties: hosting providers, managed service providers, PSPs. Their compliance must be monitored under contract (12.8), and their share of responsibility documented in a responsibility matrix.
| Component | In scope? | Why |
|---|---|---|
| Order database containing encrypted PANs | Yes (CDE) | Stores CHD, even if encrypted |
| AD server that authenticates CDE administrators | Yes (connected) | Compromise = access to the CDE |
| Marketing website on an isolated VLAN, with payment 100% redirected to the PSP | Partially | The redirecting page stays in scope (it can be hijacked) |
| HR ERP on a filtered segment with no traffic to the CDE | No | Segmentation validated by testing = out of scope |
Version 4.0.x settles a point of principle: scoping is no longer an implicit best practice but a tested requirement. The entity must prove every year that it has confirmed its scope, and the assessor must verify it. An understated scope discovered during an audit can invalidate an entire compliance cycle.
Chapter 3. The 12 requirements of v4.0.x.
The 12 requirements fall under six goals: build and maintain a secure network (1–2), protect account data (3–4), manage vulnerabilities (5–6), control access (7–9), monitor and test (10–11), and govern security (12). Behind these 12 headings sit roughly 250 to 300 testable controls, many of which v4.0.x has tightened. The table below walks through them from a practitioner’s perspective.
| Requirement | Requirement | Key v4.0.x changes |
|---|---|---|
| 1 | Network security controls (NSCs) | Terminology broadened beyond firewalls: cloud, SDN, containers |
| 2 | Secure configurations | Systematic hardening; no more vendor default accounts and passwords |
| 3 | Protect stored account data | PAN hashes must be keyed (3.5.1.1); disk encryption alone is not enough except on removable media (3.5.1.2); pre-authorization SAD must be encrypted (3.3.2) |
| 4 | Strong cryptography in transit over public networks | Inventory of trusted keys and certificates (4.2.1.1) |
| 5 | Protection from malicious software | Anti-phishing mechanisms (5.4.1), scanning of removable media (5.3.3) |
| 6 | Secure systems and software | 6.4.3: payment page script management; inventory of software components (6.3.2); addressing all vulnerabilities, not just critical ones (6.3.1) |
| 7 | Restrict access on a need-to-know basis | User access reviews at least every six months (7.2.4) |
| 8 | Identify and authenticate | Passwords of at least 12 characters (8.3.6), MFA for all access into the CDE, not just administrators (8.4.2), tighter controls on service accounts (8.6.x) |
| 9 | Restrict physical access | Periodic inspection of POI devices for physical skimming (9.5.1) |
| 10 | Log and monitor | Automated log reviews (10.4.1.1); detection and handling of critical security control failures (10.7.2/10.7.3) |
| 11 | Test security regularly | Authenticated internal scans (11.3.1.2); 11.6.1: change detection on payment pages |
| 12 | Governance and programs | Targeted risk analyses (TRA, 12.3.1) for every frequency the entity must define, documented scope reviews (12.5.2), formal roles and responsibilities for each requirement |
Defined approach or customized approach
Version 4.0 offers two ways to meet a requirement. The defined approach implements the control as written and tests it against the standard’s testing procedures. The customized approach lets the entity design a different control that meets the stated security objective. The entity documents the control and performs a targeted risk analysis, and the assessor then designs its own testing procedures. It is a powerful tool for mature organizations, but it demands a lot of evidence.
- Theme 1, authentication: MFA everywhere into the CDE, resistant to replay and bypass (8.4.2, 8.5.1), and passwords of 12 characters or more.
- Theme 2, e-skimming: together, 6.4.3 and 11.6.1 go straight after payment page compromises (covered in a dedicated chapter below).
- Theme 3, continuous compliance: TRAs to justify frequencies, detection of control failures, documented reviews. The “annual snapshot” gives way to an ongoing process (BAU, business as usual).
Chapter 4. Merchant levels and validation: SAQ, ROC, AOC.
Everyone must be compliant, but not everyone proves it the same way. The networks sort merchants into four levels by annual transaction volume. The level determines how compliance is validated: either an on-site audit resulting in a ROC (Report on Compliance) signed by a QSA (Qualified Security Assessor) or an internal ISA, or a self-assessment using an SAQ (Self-Assessment Questionnaire). Either way, an AOC (Attestation of Compliance) goes to the acquirer.
| Level | Annual volume | Required validation |
|---|---|---|
| 1 | >6 million transactions (all channels), or a compromised merchant that has been reclassified | Annual ROC by a QSA (or certified ISA) + AOC + quarterly ASV scans |
| 2 | 1 to 6 million | Annual SAQ + ASV (Mastercard: SAQ countersigned by a QSA/ISA) |
| 3 | 20,000 to 1 million e-commerce transactions | Annual SAQ + ASV |
| 4 | <20,000 e-commerce and <1 million total | Annual SAQ + ASV, per acquirer requirements |
Service providers (PSPs, hosting providers, processors, token vault operators) follow a two-level scale. Above 300,000 transactions processed, an annual ROC is mandatory. Providers can then be listed on the Visa and Mastercard registries of compliant service providers, which is as much a selling point as an obligation.
Choosing your SAQ: match it to how you accept payments
| SAQ | Best for | Approximate size |
|---|---|---|
| A | E-commerce or MOTO (mail/telephone order) fully outsourced: full redirect or PSP iframe, no electronic storage or processing of CHD | ≈ 30 questions |
| A-EP | E-commerce site that doesn’t collect payment itself but whose code affects the security of the payment page (Direct Post, a form built by your scripts) | ≈150 questions |
| B | Manual imprinters (“knuckle-busters”) or standalone dial-up terminals on analog phone lines, with no e-commerce and no electronic storage | ≈40 questions |
| B-IP | Standalone PTS-approved terminals connected over IP, no electronic storage | ≈80 questions |
| C-VT | Virtual terminal: manual entry of one transaction at a time on a dedicated, isolated workstation | ≈80 questions |
| C | Internet-connected payment application, no electronic storage of CHD | ≈160 questions |
| P2PE | Only terminals from a PCI-validated P2PE solution, no electronic storage | ≈ 30 questions |
| D | All other cases (PAN storage, server-to-server integration, etc.), and all service providers | 250+ questions |
In practice, your acquirer (or PSP) has the final word on which SAQ applies and how often you must provide evidence. If you are torn between two SAQs, document your eligibility reasoning: it is the first document requested after an incident.
Chapter 5. Reducing scope: tokenization, iframes, redirects, P2PE.
The best security control is not holding the data at all. Modern PCI compliance strategy moves card data to specialists (PSPs, P2PE providers, token vaults), turning an SAQ D project with 250+ controls into an SAQ A of about 30 questions. Four levers dominate.
| Integration | Who touches the data? | SAQ | Cost |
|---|---|---|---|
| Full redirect to the PSP | PSP only | A | Minimal |
| PSP iframe / hosted fields | PSP (fields isolated within your page) | A | Minimal + script monitoring |
| Direct Post (form on your site, direct POST to the PSP) | Your page builds the form | A-EP | High (≈150 questions, ASV, pentest) |
| Your scripts collect the data, then call an API | Your servers or your JS see the PAN | D | Maximum |
| Server-to-server (the PAN passes through your back end) | You, end to end | D | Maximum |
Tokenization comes in two types. Vault tokens are issued by your PSP. They are ideal for one-click payments and subscriptions, but they lock you in to that PSP. Network tokens (Visa VTS, Mastercard MDES) are issued by the card networks. They follow the card (updating automatically when it is reissued), are portable across acquirers, and improve authorization rates. Either way, a token outside the CDE is not card data, and that shift is the whole point.
P2PE: validated point-to-point encryption
A PCI-validated P2PE solution encrypts data the moment it is captured in an approved terminal (the SRED function of PTS devices), under strict key management. Key management usually relies on DUKPT, with a unique key derived for each transaction. Decryption happens only in an HSM within the provider’s secure environment, so the merchant cannot technically access cleartext data, and its POS systems, network, and back office drop out of scope. One caveat: a home-grown E2EE solution that is not listed by the PCI SSC does not qualify for SAQ P2PE, and any scope reduction is then at the acquirer’s discretion.
Chapter 6. 6.4.3 and 11.6.1: countering Magecart web skimming.
Magecart refers to a loose constellation of criminal groups specializing in digital skimming. They inject a few lines of JavaScript into a payment page to copy card data as the customer types it, then exfiltrate it to a third-party server. The attack is invisible to the merchant (the transaction completes normally) and to the customer (the page looks untouched). The attack vectors are well known: compromise of the site itself and, above all, the third-party script supply chain, where a tag manager, chatbot, review widget, or analytics script is modified at the source.
Requirement 6.4.3: governing scripts
- A complete inventory of all scripts loaded and executed in the consumer’s browser on payment pages, including third-party scripts and the dependencies they load in turn.
- Written justification for why each script is needed: any script without a documented purpose must go.
- Authorization: a mechanism (process plus technology) ensures that only approved scripts can be added.
- Integrity: a method ensures that each script has not been tampered with (SRI, CSP, or a dedicated monitoring solution).
Requirement 11.6.1: detecting tampering
A change- and tamper-detection mechanism must alert on any unauthorized modification to security-impacting HTTP headers (notably the CSP). It also covers the contents of payment page scripts as received by the consumer’s browser. The key word is “received”: what must be monitored is what the client actually renders, not just the files on the server. It must run at least weekly, or at the frequency defined by a targeted risk analysis (TRA).
<!-- HTTP header: restrictive CSP on the payment page -->
Content-Security-Policy:
default-src 'self';
script-src 'self' https://js.psp-example.com;
frame-src https://checkout.psp-example.com;
connect-src 'self' https://api.psp-example.com;
report-uri https://csp-report.merchant-example.com/collect
<!-- Integrity check (SRI) for a versioned third-party script -->
<script
src="https://js.psp-example.com/v3/checkout.js"
integrity="sha384-oqVuAfXRKap7fdgcCY5uykM6R9GqQ8KvuXy9rx7HNQlGYl1kPzQho1wxJwY8wC7q"
crossorigin="anonymous"></script>In practice, merchants layer several defenses. The CSP runs in blocking mode, with violation reporting (report-uri). SRI covers versioned scripts but does not work for PSPs’ self-updating scripts, which is why dedicated domains allowlisted in the CSP matter. Payment page monitoring tools replay a purchase journey through synthetic crawling and compare the scripts received, backed by real-time DOM monitoring. Even with a PSP iframe (SAQ A), the parent page can be hijacked to overlay a fake form: vigilance can never be fully delegated.
Chapter 7. Proving resilience: ASV scans and penetration testing.
Requirement 11 mandates an ongoing testing cycle on two complementary fronts: vulnerability scans (automated, broad, frequent) and penetration tests (manual, deep, scenario-based). Confusing the two is a classic cause of non-compliance.
| Scan | Frequency | Pass criteria |
|---|---|---|
| Internal (11.3.1) | Quarterly + after significant changes | Critical and high-risk vulnerabilities fixed, verified by rescan |
| Authenticated internal (11.3.1.2) | Quarterly (mandatory since Mar. 31, 2025) | Scan with credentials privileged enough to see the systems’ internal vulnerabilities |
| External, by an ASV (11.3.2) | Quarterly + after significant changes | No vulnerability scoring CVSS ≥ 4.0; report attested by the ASV |
An ASV (Approved Scanning Vendor) is a provider approved by the PCI SSC, and only an ASV can produce acceptable external scans. Discipline matters as much as technology: four passing scans a year, dated, with rescans until blocking findings are eliminated. A missed quarter cannot be made up after the fact.
Penetration testing (11.4)
- Frequency: at least annually and after any significant infrastructure or application change or upgrade.
- Scope: external and internal, network layer and application layer (with OWASP as the reference), covering the entire CDE and its critical entry points.
- Documented methodology: an industry-recognized approach, a qualified tester who is independent of the team operating the systems tested, and written rules of engagement.
- Segmentation: controls isolating the CDE are tested at least once a year (merchants) and every six months (service providers), per 11.4.5/11.4.6.
- Remediation: exploitable vulnerabilities found are fixed and then retested.
| Vulnerability scan | Penetration test | |
|---|---|---|
| Type | Automated, signature catalog | Manual, real exploitation and chaining of vulnerabilities |
| PCI frequency | Quarterly | Annually + after significant changes |
| Deliverable | Prioritized vulnerability report (CVSS) | Proof of exploitation, attack paths, demonstrated impact |
| Who | Internal tool + approved ASV (external) | Qualified tester, independent of the system tested |
Chapter 8. Incidents, notification, and the real cost of non-compliance.
Requirement 12.10 calls for an operational incident response plan with defined roles and contacts, 24/7 availability, scenario-specific procedures, testing of the plan at least once a year, and staff training. Version 4 adds dedicated procedures for when a PAN is found where it should not be, such as in rogue exports, logs, or tickets (12.10.7). When an incident hits, improvising costs millions.
The cost of non-compliance
| Item | Typical range | Notes |
|---|---|---|
| Network non-compliance fines | $5,000 to $100,000 per month (ranges historically cited by acquirers) | Charged to the acquirer and passed on to the merchant by contract |
| Reissuing compromised cards | ≈$3 to $5 per card | Multiplied by tens or hundreds of thousands of cards |
| Resulting fraud (fraud recovery) | Varies; often the largest item | Issuers recover their losses through network programs |
| PFI investigation + remediation | Tens to hundreds of thousands of euros | Not counting internal teams tied up |
| GDPR fine | Up to 4% of global revenue | British Airways: £20M (ICO, 2020); Ticketmaster: £1.25M |
| Commercial fallout | Higher fees, reserves, termination of the acquiring agreement | Worst case: listing on MATCH (Mastercard’s database of terminated merchants), which makes it very hard to sign any new agreement |