CVE-2021-47155

9.1 CRITICAL

📋 TL;DR

This vulnerability in Net::IPv4Addr 0.10 for Perl allows attackers to bypass IP-based access controls by using IP addresses with extraneous zero characters (like 192.168.001.010). Systems using this module for IP address validation or access control are affected.

💻 Affected Systems

Products:
  • Net::IPv4Addr Perl module
Versions: Version 0.10 specifically
Operating Systems: Any OS running Perl with Net::IPv4Addr
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications that use Net::IPv4Addr for IP address parsing/validation. The vulnerability is in the parsing logic itself.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete bypass of IP-based authentication and authorization systems, potentially allowing unauthorized access to sensitive systems or data.

🟠

Likely Case

Partial bypass of IP whitelisting/blacklisting controls, enabling unauthorized access to restricted resources or services.

🟢

If Mitigated

Limited impact if additional authentication layers or network segmentation exist beyond IP-based controls.

🌐 Internet-Facing: HIGH - Internet-facing systems using this module for IP filtering are directly exposed to exploitation attempts.
🏢 Internal Only: MEDIUM - Internal systems could be targeted by compromised internal hosts or malicious insiders.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires sending specially crafted IP addresses with leading zeros to systems using vulnerable Net::IPv4Addr parsing.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version 0.11 or later

Vendor Advisory: https://metacpan.org/release/Net-IPv4Addr

Restart Required: No

Instructions:

1. Update Net::IPv4Addr using CPAN: 'cpan Net::IPv4Addr'
2. Verify installation of version 0.11 or later
3. No restart required, but affected Perl scripts should be reloaded

🔧 Temporary Workarounds

Input Validation Workaround

all

Implement custom IP validation that rejects addresses with leading zeros before passing to Net::IPv4Addr

perl -e 'if ($ip =~ /\b0\d+/) { die "Invalid IP with leading zeros" }'

🧯 If You Can't Patch

  • Implement additional authentication layers beyond IP-based controls
  • Use network-level controls (firewalls, WAFs) to filter traffic before it reaches vulnerable applications

🔍 How to Verify

Check if Vulnerable:

Check if Perl scripts use Net::IPv4Addr and test with IP '192.168.001.001' - if it parses as valid, system is vulnerable

Check Version:

perl -MNet::IPv4Addr -e 'print $Net::IPv4Addr::VERSION'

Verify Fix Applied:

After update, test with IP '192.168.001.001' - should be rejected or normalized without extra zeros

📡 Detection & Monitoring

Log Indicators:

  • Failed authentication attempts with IPs containing leading zeros
  • Access from unexpected IP ranges

Network Indicators:

  • Traffic with IP addresses containing octets with leading zeros in application layer

SIEM Query:

source="application_logs" AND (ip_address="*0[0-9]*.*" OR message="*bypass*" OR message="*unauthorized*")

🔗 References

📤 Share & Export