Dataease SQLBot
SQLBot: Arbitrary File Write via parseExcel Leading to Code Execution Through Alembic Import Processing
SQLBot is an intelligent Text-to-SQL system based on large language models and RAG. Prior to 1.9.0, the POST /api/v1/datasource/parseExcel endpoint in backend/apps/datasource/api/datasource.py uses attacker-controlled multipart filename data when selecting where uploaded content is stored, writes the content before spreadsheet parsing and validation finish, and can transform a double-extension filename into a Python source file. An attacker able to submit a crafted multipart upload can use these behaviors to place attacker-controlled content in /opt/sqlbot/app/alembic/versions/ even when a spreadsheet parsing failure after the file write causes the endpoint to return an error. The planted file remains on disk, and subsequent SQLBot startup or migration processing causes Alembic to import the module and execute its module-level statements in the SQLBot application runtime. This issue is fixed in version 1.9.0.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 1.9.0
Fixed in 1.9.0
Mitigation
Upgrade SQLBot to 1.9.0 or later.
References
- Vendor advisory github.com/dataease/SQLBot/security/advisories…
- Patch github.com/dataease/SQLBot/commit/4bfd0f49e8cd…
- Patch github.com/dataease/SQLBot/commit/92c5aea70b2e…
1 more
- Release notes github.com/dataease/SQLBot/releases/tag/v1.9.0
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.