medium · M8 · MASVS-PLATFORM-3 · PTKD-GL-HARDCODED-IPV4

    Hardcoded IPv4 address (text search)

    Apps must support IPv6. Hardcoded IPv4 addresses will fail on IPv6-only networks.

    How it is exploited

    Not an attack: the app calls http://203.0.113.10/api directly. App Review tests on an IPv6-only network (NAT64); a literal IPv4 address cannot be reached there, so the reviewer sees a spinner or 'no connection'.

    Why it matters

    A rejection under 2.1 / 2.5 for a crash or broken feature, and the same failure for real users on IPv6-only carrier networks.

    How to fix it

    1. Replace IP literals with a hostname that has both A and AAAA records (or that resolves through NAT64).
    2. Use the platform's high-level networking (URLSession, fetch, OkHttp); do not resolve and connect to IPv4 addresses yourself.
    3. Test on an IPv6-only network: macOS Internet Sharing has a 'Create NAT64 Network' option.

    Does your app have this?

    PTKD checks your build or your source project for PTKD-GL-HARDCODED-IPV4 and every other check in this knowledge base.

    Scan your app

    References

    Related checks (M8)