CVE-2016-10321

9.8 CRITICAL

📋 TL;DR

This vulnerability in web2py allows remote attackers to bypass host-based access restrictions and perform brute-force password attacks against login systems. It affects web2py applications that use host-based access control lists. The flaw enables attackers to attempt unlimited password guesses even when their IP address should be blocked.

💻 Affected Systems

Products:
  • web2py
Versions: All versions before 2.14.6
Operating Systems: All platforms running web2py
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations using host-based access control lists. Applications without access control restrictions are not vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete account takeover through brute-force attacks leading to unauthorized access, data theft, and potential privilege escalation within the application.

🟠

Likely Case

Successful brute-force attacks against weak passwords, resulting in unauthorized access to user accounts and potential data exposure.

🟢

If Mitigated

Limited impact with strong password policies, account lockouts, and network-level protections in place.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

The vulnerability is straightforward to exploit using automated tools. Public proof-of-concept code exists in the GitHub issue tracker.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.14.6 and later

Vendor Advisory: https://github.com/web2py/web2py/commit/944d8bd8f3c5cf8ae296fc03d149056c65358426

Restart Required: Yes

Instructions:

1. Backup your web2py application. 2. Update web2py to version 2.14.6 or later. 3. Restart the web2py application server. 4. Verify the fix by checking the version and testing access controls.

🔧 Temporary Workarounds

Implement Rate Limiting

all

Add application-level rate limiting for login attempts to prevent brute-force attacks.

# Implement in your web2py controller:
from gluon.tools import Recaptcha2
# Add rate limiting logic to login functions

Network-Level Blocking

linux

Use firewall rules or web application firewall to block suspicious IP addresses attempting multiple login attempts.

# Example iptables rule:
# iptables -A INPUT -p tcp --dport 80 -m recent --set --name web2py
# iptables -A INPUT -p tcp --dport 80 -m recent --update --seconds 60 --hitcount 10 --name web2py -j DROP

🧯 If You Can't Patch

  • Implement strong password policies requiring complex passwords to reduce brute-force success probability.
  • Deploy web application firewall with brute-force protection rules and monitor for suspicious login patterns.

🔍 How to Verify

Check if Vulnerable:

Check web2py version. If version is earlier than 2.14.6 and uses host-based access controls, the system is vulnerable.

Check Version:

python web2py.py --version

Verify Fix Applied:

After updating to 2.14.6+, test that blocked hosts cannot attempt password verification. Verify version shows 2.14.6 or higher.

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed login attempts from same IP address
  • Login attempts from IP addresses in deny lists
  • Unusual login patterns outside normal hours

Network Indicators:

  • High volume of POST requests to login endpoints
  • Traffic patterns showing systematic password guessing

SIEM Query:

source="web2py" (event="login_failed" OR event="authentication_failure") | stats count by src_ip | where count > 10

🔗 References

📤 Share & Export