Description
The Python AI module in Wesnoth 1.4.x and 1.5 before 1.5.11 allows remote attackers to escape the sandbox and execute arbitrary code by using a whitelisted module that imports an unsafe module, then using a hierarchical module name to access the unsafe module through the whitelisted module.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 5.0 | wesnoth | 1:1.4.4-2+lenny1 | DSA-1737-1 |
| Debian 4.0 | wesnoth | 1.2-5 | DSA-1737-1 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- Wesnoth 1.x - PythonAI Remote Code Execution EDB-32837 · remote · Feb 25, 2009 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 1
- DSA-1737-1 wesnoth - several vulnerabilities Debian Security (DSA / DLA) · Mar 9, 2026
References
- http://launchpad.net/bugs/336396
- http://packages.debian.org/changelogs/pool/main/w/wesnoth/wesnoth_1.5.12-1/changelog
- https://gna.org/bugs/index.php?13048
- wesnoth-pythonai-code-execution(49058) vdb-entry
- http://www.wesnoth.org/forum/viewtopic.php?t=24340
- http://packages.debian.org/changelogs/pool/main/w/wesnoth/wesnoth_1.4.7-4/changelog
- http://www.wesnoth.org/forum/viewtopic.php?t=24247
- 34058 third-party-advisory
- ADV-2009-0595 vdb-entry
- http://launchpad.net/bugs/cve/2009-0367
- 34236 third-party-advisory
- DSA-1737 vendor-advisory
- http://launchpad.net/bugs/335089