Back to all lessons
Awareness Lessons
last week

WordPress Secrets API Highlights Risks of Inconsistent Encryption Defaults

Written by AI from the linked story. Not reviewed by an editor. How this works

WordPress 7.2's new Secrets API is a positive step toward protecting sensitive credentials like API keys and tokens stored in the database, but its rollout exposes a critical gap: existing sites upgraded from older versions will not have encryption enabled by default, leaving stored secrets unprotected unless administrators manually intervene. Installation methods such as WP-CLI and one-click installers currently cannot write the required encryption key to wp-config.php, creating inconsistent security postures across deployments. Additionally, unresolved concerns from core contributors about the API's security boundaries suggest the feature may ship with architectural weaknesses. This matters because credentials stored in plaintext or without proper encryption are a prime target for attackers who gain database access, turning a single breach into full credential exposure across integrated services.

Tactical Insight

Immediate actions

  • Audit all existing WordPress installations and manually add the encryption key to wp-config.php as documented once WordPress 7.2 is released.
  • Inventory all API keys, tokens, and passwords currently stored in WordPress databases and rotate any that may have been exposed.

Configuration hardening

  • Ensure your deployment pipeline (WP-CLI, one-click installers, CI/CD) is updated to automatically generate and inject the encryption key during installation before upgrading to 7.2.
  • Restrict database access permissions so that even if credentials are stored, unauthorized users cannot query the options or secrets tables directly.

Long-term improvements

  • Establish a secrets management policy that requires all credentials to be stored in a dedicated secrets vault (e.g., HashiCorp Vault, AWS Secrets Manager) rather than relying solely on CMS-level encryption.
  • Include encryption-at-rest verification as part of your regular configuration compliance checks and change management reviews.

Back this up with a control

All controls and vendors

Training helps people spot this. These controls make the attack fail even on the day someone does not.