CVE-2019-19010

9.8 CRITICAL

📋 TL;DR

This vulnerability allows remote unauthenticated attackers to execute arbitrary code via eval injection in the Math plugin of Limnoria and Supybot IRC bots. Attackers can use the calc and icalc IRC commands to disclose sensitive information or potentially gain full control of affected systems. Anyone running vulnerable versions of Limnoria (before 2019.11.09) or Supybot (through 2018-05-09) is affected.

💻 Affected Systems

Products:
  • Limnoria
  • Supybot
Versions: Limnoria: before 2019.11.09; Supybot: through 2018-05-09
Operating Systems: All platforms running Python
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists when Math plugin is enabled (default configuration).

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data exfiltration, and botnet recruitment.

🟠

Likely Case

Information disclosure and limited code execution within the IRC bot's context, potentially escalating to full system access.

🟢

If Mitigated

No impact if the Math plugin is disabled or proper input validation is implemented.

🌐 Internet-Facing: HIGH - IRC bots are typically internet-facing services accessible to any IRC user.
🏢 Internal Only: MEDIUM - Internal IRC bots could still be exploited by authenticated internal users.

🎯 Exploit Status

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

Exploitation requires sending specially crafted IRC commands to the bot. Public proof-of-concept exists in advisory links.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Limnoria: 2019.11.09 or later; Supybot: versions after 2018-05-09

Vendor Advisory: https://github.com/ProgVal/Limnoria/wiki/math-eval-vulnerability

Restart Required: Yes

Instructions:

1. Update Limnoria: pip install --upgrade limnoria
2. Update Supybot: pip install --upgrade supybot
3. Restart the IRC bot service
4. Verify the Math plugin is updated to patched version

🔧 Temporary Workarounds

Disable Math Plugin

all

Temporarily disable the vulnerable Math plugin to prevent exploitation

/msg botname config plugins.math.enable false

Restrict IRC Access

all

Limit who can send commands to the bot

Configure IRC bot to only accept commands from trusted users/channels

🧯 If You Can't Patch

  • Disable the Math plugin immediately using configuration commands
  • Implement network segmentation to isolate the IRC bot from sensitive systems

🔍 How to Verify

Check if Vulnerable:

Check if Math plugin is enabled and version is vulnerable: /msg botname version

Check Version:

python -c "import supybot; print(supybot.__version__)" or check bot response to version command

Verify Fix Applied:

Verify Limnoria version is >= 2019.11.09 or Supybot version > 2018-05-09

📡 Detection & Monitoring

Log Indicators:

  • Unusual calc/icalc commands in IRC logs
  • Python eval() errors or unexpected code execution

Network Indicators:

  • IRC traffic containing suspicious mathematical expressions with Python code

SIEM Query:

source="irc.logs" AND (command="calc" OR command="icalc") AND message="*__import__* OR *eval* OR *exec*"

🔗 References

📤 Share & Export