CVE-2026-45272: MyBooks: Remote Code Execution via SOCIAL_AUTH Key Name Injection in Python Config File
MyBooks is an enhanced and easy-to-use personal ebook management web server also known as Talebook. In 3.41.2 and earlier, the AdminSettings.post handler in webserver/handlers/admin.py accepts SOCIALAUTH key names without validating quotes or newline characters, and SettingsLoader.dumpfile in webserver/loader.py concatenates those names into the generated Python source file auto.py without escaping them. An administrator can submit a crafted SOCIALAUTH key name that closes the settings dictionary and injects arbitrary Python statements. The application later executes those statements because SettingsLoader.loadfile imports auto.py as a module, and setting autoreload to true invokes restartasync so a process supervisor restarts the service and triggers the import. Successful exploitation executes commands with the privileges of the application service account and can disclose data, modify files, establish persistence, or disrupt the service. Related authorization and registration vulnerabilities can reduce the effective privilege requirement in a chained attack, but the standalone vulnerability requires administrator access. This issue is fixed in version 3.42.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
MyBooks (Talebook)to a version that resolves this vulnerability.Fixed in 3.42.0
Event History
Frequently Asked Questions
Which deployments are affected?
MyBooks versions 3.41.2 and earlier are affected. Version 3.42.0 fixes the issue.
What access and conditions are required to exploit this issue?
Standalone exploitation requires administrator access to submit a crafted SOCIAL_AUTH key name. The injected code is executed when auto.py is imported; setting autoreload to true causes a service restart that triggers that import.
What privileges does the injected code receive?
Commands execute with the privileges of the MyBooks application service account. This can allow data disclosure, file modification, persistence, or service disruption within the permissions available to that account.
How can administrators identify whether they are at risk?
Confirm the deployed MyBooks version and whether it is 3.41.2 or earlier. Review whether administrators can modify SOCIAL_AUTH key names and whether autoreload is enabled, since autoreload-triggered restart imports the generated auto.py file.