PDO\Sqlite::loadExtension loads arbitrary shared objects
Đang mở
@SakiTakamachi đang làm issue này rồi.
Từ ngày 13/5/2026.
Bug
Extension: pdo_sqlite
Status: Needs Triage
- Ngôn ngữ chính
- C
- Star
- 40.4k
- Fork
- 8.1k
- Merge trung bình
- 2 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 96
Mô tả
Description
Unlike SQLite3::loadExtension, Pdo\Sqlite::loadExtension does not check sqlite3.extension_dir and calls sqlite3_load_extension with the absolute path to the extension parameter. This allows executing native code from PHP code subject to open_basedir / disable_functions (which are not security boundaries anyway).
I'll open a PR with my patch later this week. It introduces a similar check to SQLite3::loadExtension and restricts extension loading to a trusted directory (sqlite3.extension_dir) set in advance.
PHP Version
PHP 8.6.0-dev (cli) (built: May 10 2026 23:58:07) (NTS)
Copyright © The PHP Group and Contributors
Zend Engine v4.6.0-dev, Copyright © Zend by Perforce
with Zend OPcache v8.6.0-dev, Copyright ©, by Zend by Perforce
Operating System
No response
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.