17

All the routers firmwares I've dumped so far, memorizes the wifi password as cleartext (or encoded, but it's basically cleartext).

Is it normal? Or actually for less cheap router there are other solutions to prevent this?

Can this be considered a vulnerability?

10
  • 5
    Given that the router needs the password in plain text to create the access point - what options do you see which would be better than storing the password in plain/encoded? Note that the password can not be hashed (since this is not reversable) and if it would be encrypted the appropriate decryption secret would need to be known to the router too. Commented Aug 18, 2025 at 14:19
  • 3
    High-end routers are going to use WPA-Enterprise with public-key authentication, not WPA-Personal with pre-shared keys. Commented Aug 18, 2025 at 14:43
  • 2
    @schroeder it was just curiosity to understand if it's a vulnerability or not Commented Aug 18, 2025 at 15:42
  • 4
    @allexj If someone has access to bypass the security controls of the firmware, they can MITM the traffic in a gazillion other ways anyway. Cost is a major consern in many such devices. Commented Aug 19, 2025 at 6:17
  • 5
    @Bergi The password is never sent, rather in WPA2-PSK it's used with the PBKDF2 function to derive a master key. You could store the PMK, but then it's invalid it if somebody changes the SSID. In WPA3-SAE, the PWE is dependent on the password and MAC address of the other side, so you can't save it. Commented Aug 19, 2025 at 21:51

4 Answers 4

43

The WiFi password needs to be shared with all devices that connect to the AP. Which means it is not a tightly held secret. For home routers, the password is often written right on the device itself. In public areas, it's written on the wall. Some mobile devices even let you share the wifi password across all your devices.

So, then why should it be stored encrypted in the router? You would need to have physical access to the router to "extract the password" or if you somehow exploited a vulnerability remotely, you still need to get physically close to access the network.

Adding strong security to the password in such a situation doesn't make sense. The risk equation doesn't add up when there are weaker areas of security.

If you want tight control over who/what has access, then you use certificate-based authentication.

So, no, this is not a vulnerability.

When assessing risk, or wondering if something is a vulnerability, make sure to consider the context and the operating environment. It makes no sense to use a TPM and rotating encryption keys to protect something you are going to write on the cafe wall for everyone to see.

5

Not a vulnerability

A PSK mode (PreSharedKey), which is the one here there is "a WiFi password", needs both parties to know the "password", since it is used for deriving the communication secrets. Note that this is different from normal websites, where the server authenticates its identity using the PKI (on their https certificate), the client provides their credentials in plain,¹ and the server then only needs to verify them.

Depending on the methods supported/enabled, the AP might store instead a secret derived from the password, not the password itself, such as the PBKDF2 stated in Annex J. However, this won't work with certain modes, such as WEP or, as mentioned by user71659, WPA3-SAE. Plus, if you implemented that (on the restrictive configuration where it's possible), you would need to start requiring the password for seemingly unrelated operations, such as enabling WEP or changing the SSID.

Not to mention 'features' such as showing the password on the router administrative interface or through WPS. Moreover, all of this would be significantly more effort to code for very little benefit, as the password would still need to be stored in many paths.

¹ Technically, they could do mutual authentication, but it's very uncommon.

-2

It has to be available as plaintext in order to communicate with other local devices etc.

However it should not be stored as unobfuscated plaintext, since if it were disposed of ("ewaste") or sold in that state it would reveal credentials which the former owner was quite possibly continuing to use.

8
  • 4
    In the e-waste scenario, it would be necessary to (1) recover the router in sufficient working order to extract its storage, (2) the former owner of the router to re-use the same password in their new router, and (3) have some way to track the disposed router to the original physical location where the new router is installed. This is a fairly unlikely sequence of events to simultaneously be true; it can easily be defeated by the former owner changing the password (good practice anyway), doing a factory reset before disposal, or not disposing it with location identifiers. Commented Aug 19, 2025 at 8:11
  • 1
    And from my experience, 2) involves more effort on part of the former owner then just getting a new password. If owner laziness is enough to stop an attack, it's not a very dangerous attack. Commented Aug 19, 2025 at 8:44
  • 1
    @Miral: And if an attacker has sufficient resources and motivation to carry out those steps, then the fact the password is stored in an obfuscated-but-reversible manner is unlikely to present much of a challenge to them! Commented Aug 19, 2025 at 9:31
  • And "obfuscated" needs to be "encrypted", else there is no point. Commented Aug 19, 2025 at 10:05
  • 1
    @Miral those of us with ISP-provided routers could find ourselves in that position on changing ISP - the old router is (assuming they want it back; I have a couple in my attic that I put there in case they asked for it - years ago) returned, in packaging with the sender's (former user's) address. That's 2 out of your 3. The other - well, if you want all your devices and regular guests' device to seamlessly connect to the new hardware, just set the SSID and password the same and you're done. So it's more likely than you think Commented Aug 19, 2025 at 13:09
-3

Q: Is this a vulnerability?
A: Of course it is! (It is also necessary).

Q: Is this a vulnerability worth worrying about?
A: Probably not. Dumping should be protected by an administration password and your physical security. (But those, you should worry about. I.e. set the admin password securely, and put the router in access controlled space.)

As others have pointed out, disposal runs a risk if you reuse the password. Depending on your security model, this may require incinerating the device.

8
  • 2
    How is this a security vulnerability? What else is the router supposed to do with the PSK? It cannot protect the PSK with the admin password, because that password isn't always available -- unless the admin password is permanent stored as plaintext, which would make the whole approach fairly absurd. Commented Aug 20, 2025 at 15:58
  • @Ja1024 The fact that is is NECESSARY doesn't mean it isn't a VULNERABILITY. The admin password protects against memory dumps and asking what the PSK is. The admin password is easily hashed and non-recoverable. Commented Aug 20, 2025 at 17:09
  • 1
    Then justify why it is a vulnerability. What's vulnerable? What's the risk? Commented Aug 20, 2025 at 17:18
  • @schroeder what's at risk? access to your network. Commented Aug 20, 2025 at 17:23
  • 3
    No, that's not the correct assessment. The scope is the device and this piece of data. Explain the vulnerability. Commented Aug 20, 2025 at 18:43

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.