---
title: "CAPEC-4: Using Alternative IP Address Encodings"
url: https://radicalnotion.ai/capec/capec-4
type: capec
description: "This attack relies on the adversary using unexpected formats for representing IP addresses. Networked applications may expect network location information in a specific format, such as fully qualified domains names (FQDNs), URL, IP address, or IP Address ranges. If the location information is not validated against a variety of different possible encodings and formats, the adversary can use an alternate format to bypass application access control."
updated: 2026-06-01
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CAPEC-4: Using Alternative IP Address Encodings

- **Abstraction:** Detailed
- **Status:** Draft
- **Typical severity:** High
- **Likelihood of attack:** Medium
- **CAPEC catalog version:** 3.9

## Description

This attack relies on the adversary using unexpected formats for representing IP addresses. Networked applications may expect network location information in a specific format, such as fully qualified domains names (FQDNs), URL, IP address, or IP Address ranges. If the location information is not validated against a variety of different possible encodings and formats, the adversary can use an alternate format to bypass application access control.

## Execution flow

### Step 1: Explore

\[Survey the application for IP addresses as user input\] Using a browser, an automated tool or by inspecting the application, an adversary records all entry points to the application where IP addresses are used.

- Use a spidering tool to follow and record all links and analyze the web pages to find entry points. Make special note of any links that include parameters in the URL.
- Use a proxy tool to record all user input entry points visited during a manual traversal of the web application.
- Use a browser to manually explore the website and analyze how it is constructed. Many browsers' plugins are available to facilitate the analysis or automate the discovery.
- Manually inspect the application to find entry points.

### Step 2: Experiment

\[Probe entry points to locate vulnerabilities\] The adversary uses the entry points gathered in the "Explore" phase as a target list and attempts alternate IP address encodings, observing application behavior. The adversary will also attempt to access the application through an alternate IP address encoding to see if access control changes

- Instead of using a URL, use the IP address that the URL resolves to
- Specify a port directly to a URL input
- Omit or add "http://" or "https://" to a URL to see if the application behaves differently

### Step 3: Exploit

\[Bypass access control\] Using an alternate IP address encoding, the adversary will either access the application or give the alternate encoding as input, bypassing access control restrictions.

## Prerequisites

- The target software must fail to anticipate all of the possible valid encodings of an IP/web address.
- The adversary must have the ability to communicate with the server.

## Skills required

- **Low:** The adversary has only to try IP address format combinations.

## Resources required

- The adversary needs to have knowledge of an alternative IP address encoding that bypasses the access control policy of an application. Alternatively, the adversary can simply try to brute-force various encoding possibilities.

## Consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality, Access Control, Authorization | Gain Privileges | - |

## Mitigations

- Design: Default deny access control policies
- Design: Input validation routines should check and enforce both input data types and content against a positive specification. In regards to IP addresses, this should include the authorized manner for the application to represent IP addresses and not accept user specified IP addresses and IP address formats (such as ranges)
- Implementation: Perform input validation for all remote content.

## Example instances

An adversary identifies an application server that applies a security policy based on the domain and application name. For example, the access control policy covers authentication and authorization for anyone accessing http://example.domain:8080/application. However, by using the IP address of the host instead (http://192.168.0.1:8080/application), the application authentication and authorization controls may be bypassed. The adversary relies on the victim applying policy to the namespace abstraction and not having a default deny policy in place to manage exceptions.

## Related weaknesses (CWE)

- [CWE-173](https://radicalnotion.ai/cwe/cwe-173): Improper Handling of Alternate Encoding
- [CWE-291](https://radicalnotion.ai/cwe/cwe-291): Reliance on IP Address for Authentication

## Related attack patterns

| Relationship | CAPEC | Name |
| --- | --- | --- |
| Parent | [CAPEC-267](https://radicalnotion.ai/capec/capec-267) | Leverage Alternate Encoding |

## Frequently asked questions

### What is CAPEC-4?

This attack relies on the adversary using unexpected formats for representing IP addresses. Networked applications may expect network location information in a specific format, such as fully qualified domains names (FQDNs), URL, IP address, or IP Address ranges. If the location information is not validated against a variety of different possible encodings and formats, the adversary can use an alternate format to bypass application access control.

### How does a Using Alternative IP Address Encodings attack work?

It typically unfolds over 3 phases. It begins with: \[Survey the application for IP addresses as user input\] Using a browser, an automated tool or by inspecting the application, an adversary records all entry points to the application where IP addresses are used.

### How do you prevent CAPEC-4?

Design: Default deny access control policies

### What weaknesses does CAPEC-4 target?

CAPEC-4 exploits 2 CWE weaknesses: CWE-173 (Improper Handling of Alternate Encoding) and CWE-291 (Reliance on IP Address for Authentication).

### How severe is CAPEC-4?

MITRE rates CAPEC-4 as High severity with medium likelihood of attack.

Primary source: [MITRE CAPEC](https://capec.mitre.org/data/definitions/4.html)

---

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