10 ms·
It sounds pretty safe. Your only copying rows from one database into another database. Unless you accept arbitrary SQL strings from the user it's not a signific
by vbitz 5y ago
It sounds pretty safe. Your only copying rows from one database into another database. Unless you accept arbitrary SQL strings from the user it's not a significant security risk.
It does open up some possible vulnerabilities like can the user overwrite other people's information but mitigating that requires the same validation layer you should have anyway.
- vlovich123 5y agoSQLite is explicitly not safe to be used on arbitrary DB files and there’s a nontrivial amount of exploits on it from DOS to heap overflows to remote code execution that stem from untrusted SQL queries or processing untrusted DB files [1]. At a minimum you have to follow [2] but you don’t get to say “it’s safe to open malicious files or process unrelated queries“ and “SQLite has a good security track record because all our CVEs are only from untrusted queries and malicious input files and CVEs are useless anyway“. Those are facially contradictory positions likely written by different team members that reflect their individual perspective rather then there being a well thought or security stance (at least in my opinionated viewpoint). [1] https://www.sqlite.org/cves.html https://www.sqlite.org/cves.html [2] https://www.sqlite.org/security.html https://www.sqlite.org/security.html
- smackeyacky 5y agoI do have a few of these in my importer but thanks for the links, will be implementing a few more of these safety measures.
- smackeyacky 5y agoExactly. It won't overwrite stuff that isn't yours, everythin is in a silo in the database.
- tehbeard 5y agoAs another comment pointed out, it's more dealing with carefully crafted db files that trigger issues or exploits, like a zipbomb would for archive processing.