Skip to content
goTool Español

Solutions · WordPress

WordPress: the keys in wp-config.php are the sample ones

With example names (mi-app, /ruta/al/proyecto). In GoTool, in 🛡 Security, this page shows your project's: your container, your compose file, your WordPress folder.

What's happening

The keys and salts in /ruta/al/wordpress/wp-config.php (AUTH_KEY, SECURE_AUTH_KEY…) are the sample ones or empty.

Why it matters

With them, session cookies can be forged: anyone can log in as any user, administrators included.

What to do

  1. Set new ones with wp-cli (it ends every open session: everyone has to log in again):
    wp config shuffle-salts --path=/ruta/al/wordpress
  2. Or by hand: replace the eight lines in wp-config.php with these (gotool has just generated them, only for you; they aren't stored):
    define( 'AUTH_KEY',          '&h~*/1c*F0Cib.!*681&pGi[ROpaDzAWTKPLZ,M=4cAT5oPfgD%?GQX8{`qy+IK(' );
    define( 'SECURE_AUTH_KEY',   '-f)jUTA@?~ASX[$V@)2[o7b3hKUBj&nfQBe?k`xt&vEvC1$3/(C6)b,WgpqC<x5@' );
    define( 'LOGGED_IN_KEY',     '?dU7WSgrdHf_@hy8LKrrSs2}V7PY7&9HECtJ6hKzwgn0feo4VRkNekw5O8Dag6=R' );
    define( 'NONCE_KEY',         'zjpf2p20qVy&;|8pDF$h5hvtK@c^uBm`7R&fQj[m9=Aob|:)K0H.hP%s;238`/Sj' );
    define( 'AUTH_SALT',         'Hpeavdyd3zRnoMWm[.rwO{sE6UpWPERHtu%qAjbDm+=4hjBSqUY}p@qk.m1>%_~k' );
    define( 'SECURE_AUTH_SALT',  'wy;l9MTPHd-wJ38?1GI^^+^t[;VRV5Zf0ppqrB1GY.k4PZ!ZVt!lLhq~JBR.3a6}' );
    define( 'LOGGED_IN_SALT',    ')p[A(.(VBhiszPS1RbEe4I}/ZyB6iSFJg<?3)<NP{mj&;Pi!u50(8J#C6NW9uBL]' );
    define( 'NONCE_SALT',        'U1}^oq)GpcrHzVeQNAaJ@l:gz$:n6c`4V-&:EcXj!V]lhWJlkcg/|VwIGWScbdZc' );
  3. If WordPress runs in a container, run the wp commands inside it: docker compose exec <service> wp …

How to know it's fixed

  • gotool checks the WordPress again on its next pass: once it's gone, it stops showing up.

If you can't do it that way

  • If wp-config.php reads them from environment variables (Bedrock and others), change them where they're defined.

More

CWE-798 · MITRE ATT&CK T1606

In GoTool, the file with the issue (the Dockerfile, the compose file) is also shown with the solution next to it, and the question for Claude comes ready, with your project's details and without your keys, to paste into your claude.ai.

Ask us for a demo