---
title: "CWE-291: Reliance on IP Address for Authentication"
url: https://radicalnotion.ai/cwe/cwe-291
type: cwe
description: "The product uses an IP address for authentication."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-291: Reliance on IP Address for Authentication

- **Abstraction:** Variant
- **Structure:** Simple
- **Status:** Incomplete
- **Likelihood of exploit:** High
- **CVEs with this as primary weakness:** 12
- **Of those, in CISA KEV:** 0
- **New in 2026:** 6
- **CWE catalog version:** 4.21

## Description

The product uses an IP address for authentication.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Architecture and Design | COMMISSION: This weakness refers to an incorrect design related to an architectural security tactic. |

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Access Control, Non-Repudiation | Hide Activities, Gain Privileges or Assume Identity | - |

## Potential mitigations

### Architecture and Design

Use other means of identity verification that cannot be simply spoofed. Possibilities include a username/password or certificate. While IP address verification can be a useful part of an authentication scheme, but it should not be the single factor required for authentication.

## Demonstrative examples

### Example 1

Both of these examples check if a request is from a trusted address before responding to the request.

Bad code:

```c
sd = socket(AF_INET, SOCK_DGRAM, 0);
serv.sin_family = AF_INET;
serv.sin_addr.s_addr = htonl(INADDR_ANY);
servr.sin_port = htons(1008);
bind(sd, (struct sockaddr *) & serv, sizeof(serv));

while (1) {
    memset(msg, 0x0, MAX_MSG);
    clilen = sizeof(cli);
    if (inet_ntoa(cli.sin_addr)==getTrustedAddress()) {
        n = recvfrom(sd, msg, MAX_MSG, 0, (struct sockaddr *) & cli, &clilen);
    }
}
```

Bad code:

```java
while(true) {
    DatagramPacket rp=new DatagramPacket(rData,rData.length);
    outSock.receive(rp);
    String in = new String(p.getData(),0, rp.getLength());
    InetAddress clientIPAddress = rp.getAddress();
    int port = rp.getPort();

    if (isTrustedAddress(clientIPAddress) & secretKey.equals(in)) {
        out = secret.getBytes();
        DatagramPacket sp =new DatagramPacket(out,out.length, IPAddress, port); outSock.send(sp);
    }
}
```

The code only verifies the address as stored in the request packet. An attacker can spoof this address, thus impersonating a trusted client.

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2022-30319 | S-bus functionality in a home automation product performs access control using an IP allowlist, which can be bypassed by a forged IP address. |

## Real CVEs with this weakness

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-4252 | Tenda AC8 IPv6 check\_is\_ipv6 ip address for authentication | critical | 9.3 | - | No | 2026-03-16 |
| CVE-2022-46415 | - | critical | 9.1 | - | No | 2023-03-27 |
| CVE-2024-23309 | LevelOne WBR-6012 Web Application authentication bypass vulnerability | critical | 9.0 | - | No | 2024-10-30 |
| CVE-2026-107154 | - | high | 8.8 | - | No | 2026-11-06 |
| CVE-2025-34202 | Vasion Print (formerly PrinterLogic) Insecure Access to Docker Instances WAN | high | 8.7 | - | No | 2025-09-19 |
| CVE-2023-7211 | Uniway Router Administrative Web Interface reliance on ip address for authentication | high | 8.1 | - | No | 2024-01-07 |
| CVE-2025-59101 | Insufficient Session Management in dormakaba access manager | high | 7.7 | - | No | 2026-01-26 |
| CVE-2023-35906 | IBM Aspera Faspex security bypass | high | 7.5 | - | No | 2023-09-05 |
| CVE-2026-3690 | OpenClaw Canvas Authentication Bypass Vulnerability | high | 7.4 | - | No | 2026-04-11 |
| CVE-2025-66602 | Reliance on IP Address for Authentication in Yokogawa FAST/TOOLS | medium | 6.9 | - | No | 2026-02-09 |
| CVE-2024-32765 | QTS, QuTS hero | medium | 4.2 | - | No | 2024-08-09 |
| CVE-2026-86485 | - | low | 3.5 | - | No | 2026-09-07 |

## Related attack patterns (CAPEC)

- [CAPEC-4](https://radicalnotion.ai/capec/capec-4): Using Alternative IP Address Encodings

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-290](https://radicalnotion.ai/cwe/cwe-290) | Authentication Bypass by Spoofing |
| Parent | [CWE-923](https://radicalnotion.ai/cwe/cwe-923) | Improper Restriction of Communication Channel to Intended Endpoints |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| CLASP | Trusting self-reported IP address | - | - |

## Frequently asked questions

### What is CWE-291?

The product uses an IP address for authentication.

### What CVEs are caused by CWE-291?

12 recorded CVEs are attributed to CWE-291, including CVE-2026-4252, CVE-2022-46415 and CVE-2024-23309.

### How do you prevent CWE-291?

Use other means of identity verification that cannot be simply spoofed. Possibilities include a username/password or certificate. While IP address verification can be a useful part of an authentication scheme, but it should not be the single factor required for authentication.

### What are the consequences of CWE-291?

Exploiting CWE-291 can lead to: Hide Activities, Gain Privileges or Assume Identity.

### Is CWE-291 actively exploited?

12 recorded CVEs are caused by CWE-291; none are currently in CISA's KEV catalog of actively exploited flaws.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/291.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-291). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
