Safeguard
Application Security•

CWE-1390 Weak Authentication: Proving Identity Is Not Enough

Weak authentication lets attackers claim an identity with less effort than you planned for. See the patterns behind real CVEs and what to check in your own login flow.

Safeguard Security Team
3 min read

CWE-1390, Weak Authentication, is the case where a product uses an authentication mechanism to restrict access, but the mechanism does not sufficiently prove that the claimed identity is correct.

It is a broad class. MITRE puts it plainly: attackers may be able to bypass weak authentication faster, or with less effort, than expected. It applies to web apps, proxies, chat tools and industrial systems alike.

How it happens

The record's observed examples show that weak authentication is rarely one big hole. It is usually a small logic slip in a mechanism that otherwise exists.

  • CVE-2024-48445: an e-commerce app relies on an easily guessable timestamp in its authentication algorithm.
  • CVE-2022-30034: the web UI of a Python RPC framework does not use regex anchors when validating login emails, which could allow an OAuth bypass.
  • CVE-2022-35248: a chat application skips validation when Central Authentication Service is enabled, which removes the second factor from two factor authentication.
  • CVE-2021-3116: a Python based HTTP proxy uses the wrong boolean operators, causing an incorrect comparison in its authentication failure check.

Four different mistakes: a guessable value, an unanchored pattern, a skipped step and a wrong operator. Each one leaves the login screen in place while weakening what it proves.

What an attacker gains

MITRE lists a wide spread of consequences: loss of confidentiality, integrity and availability, bypass of access control, reading application data, gaining privileges or assuming another identity, and executing unauthorized code or commands. Weak authentication can expose resources or functionality to actors who should never see them, and the downstream impact depends on what sits behind the login.

How to find it

The record gives no detection methods, so here are checks drawn from the examples above.

  1. Read your authentication code for anything derived from a timestamp or another predictable value.
  2. Check every regular expression used to validate emails or usernames for anchors at both ends.
  3. Test each alternate login path, such as single sign on modes, and confirm the second factor is still enforced on every one.
  4. Review boolean logic in authentication checks. Write a test for each combination of conditions, including the failing ones.

How to fix it

MITRE lists no specific mitigations for this entry, so these steps follow from the weaknesses above.

  • Use unpredictable, randomly generated values wherever a value gates access.
  • Anchor validation patterns, and prefer exact comparison to substring matching.
  • Make second factor enforcement a single code path that every login mode must pass through.
  • Cover authentication with tests that try to fail it on purpose.

Quick check

Does having a login screen mean authentication is strong?

No. The examples in the record all had authentication in place, yet a guessable value, a missing anchor, a skipped step or a wrong operator weakened it.

Why do unanchored regular expressions matter for login?

Without anchors, a pattern can match part of a string, so an input can pass validation that was meant to reject it. CVE-2022-30034 is an example involving login emails.

Sources

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.