Payment Card Magnetic Stripe Track 2

Detects ISO/IEC 7813 magnetic-stripe Track 2 data for payment cards: a start sentinel ;, the primary account number, a field separator =, expiry (YYMM), service code and discretionary data, end sentinel ?. Also detects the common no-sentinel database form PAN=YYMM... Storing full track data after authorization is prohibited by PCI DSS 4.0 Requirement 3.3.1.

Type
regex
Engine
universal
Confidence
high
Confidence justification
High confidence: the sentinel form is unmistakable, and the no-sentinel form requires a 13-19 digit account number immediately followed by = and at least 7 further digits (expiry, service code and discretionary), a structure that does not occur in ordinary text, making false positives unlikely.
Jurisdictions
global
Regulations
PCI-DSS
Frameworks
CIS Controls, ISO 27001, NIST CSF, SOC 2
Data categories
financial
Scope
narrow
Risk rating
10
Platform compatibility
Purview: Compatible, GCP DLP: Unsupported, Macie: Unsupported, Zscaler: Compatible, Palo Alto: Unsupported, Netskope: Unsupported

Pattern

;\d{13,19}=\d{4}\d{3}\d*\?|(?<![0-9;])\d{13,19}=\d{7,40}(?![0-9])

Corroborative evidence keywords

track 2, track data, magnetic stripe, magstripe, card present, sensitive authentication data, SAD, PAN

Proximity: 300 characters

Should match

Should not match

Known false positives

References