
Proof-of-concept exploit for time-based blind SQL injection in Bacula-Web's jobfiles endpoint, using pg_sleep() delays to extract PostgreSQL version remotely.
Vulnerability Title: Time-Based Blind SQL Injection in Bacula-Web
Product: Bacula-Web
Versions Affected: Confirmed in versions supporting PostgreSQL backend
CVE ID: CVE-2025-45346
Severity: High
Attack Vector: Remote
Impact: Arbitrary SQL Execution, Information Disclosure
This proof-of-concept (PoC) demonstrates a time-based blind SQL injection vulnerability in the jobfiles endpoint of Bacula-Web.
A remote attacker can leverage this flaw to extract information from the underlying PostgreSQL database — including the database version — by triggering deliberate delays using the pg_sleep() function.
requests library (pip install requests)Edit the script and set:
base_url = "http://baculaweb.domain/jobfiles/29/1/"
cookies = {"Bacula-Web": "REPLACEME"}
Replace:
base_url with your Bacula-Web target URLREPLACEME with your valid Bacula-Web session cookiepython3 extract_pgsql_version.py
pg_sleep(2) to verify injection.SUBSTRING() and compares characters one-by-one.jobfiles routeSecurity Researcher – Kevin Suckiel -- 0xsu3ks PoC for CVE-2025-45346 disclosed via responsible disclosure.
This tool is provided for authorized testing and research purposes only.
The author is not responsible for any unauthorized use or misuse of this PoC.