Service accounts follow the principle of least privilege
Why it matters
PCI-DSS 4.0 Req 7.2.2 requires that privileges assigned to accounts and roles are based on least privilege. Req 8.2.1 limits account use to the single purpose for which it was created. A reporting cron job running with full database admin credentials means a compromised job scheduler has write access to the entire CDE. CWE-250 (Execution with Unnecessary Privileges) and OWASP A01 (Broken Access Control) both flag over-privileged service accounts as exploitable. NIST AC-6 (Least Privilege) mandates that each automated process is granted only the minimum rights required for its function.
Severity rationale
Low because over-privileged service accounts expand blast radius when compromised but typically require an upstream component compromise first — the risk is real but conditional on a prior step in the attack chain.
Remediation
Audit every service account, API key, and IAM role in your infrastructure and downscope each to the minimum required permissions. Create named database users per job rather than sharing an admin credential.
-- Read-only user for nightly reporting job
CREATE USER reporting_job PASSWORD 'generated_secret';
GRANT CONNECT ON DATABASE main TO reporting_job;
GRANT USAGE ON SCHEMA public TO reporting_job;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO reporting_job;
For AWS IAM, replace "Action": "*" with an explicit list of required actions and a specific resource ARN. For Stripe, create a Restricted Key in the dashboard scoped to only the operations each service needs — webhook handlers need webhooks:read, not full account access. Document each service account's scope in docs/rbac.md.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the PCI Compliance Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- pci-dss:4.0 · Req 7.2 — Access to system components and data is appropriately defined and assigned
- pci-dss:4.0 · Req 8.2 — User identification and related accounts for users and administrators are strictly managed
- cwe · CWE-250 — Execution with Unnecessary Privileges
- owasp:2021 · A01 — Broken Access Control
- nist:rev5 · AC-6 — Least Privilege
- soc2:2017 · CC6.3 — Role-based access and least privilege
Taxons
History
- 2026-04-18·v1.0.0·Initial import from ecommerce-pci·automated
- 2026-07-06·v1.0.1·Add SOC 2 TSC mapping (CC6.3) from the verified compliance crosswalk register (docs/compliance/).·by soc2-mapping-enrichment-ship-2