CVE-2008-1875: SQL Injection in Terong PHP Photo Gallery 1.0
- Vendor
- Terong
A SQL injection vulnerability exists in index.php of Terong PHP Photo Gallery (Advanced Web Photo Gallery) version 1.0. The vulnerability is due to insufficient sanitization of the 'photo_id' parameter, allowing remote attackers to inject arbitrary SQL commands into database queries executed by the application.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows remote attackers to execute arbitrary SQL commands against the backend database. This can lead to unauthorized data access, data modification, or potentially full compromise of the application and underlying server, depending on database privileges and configuration.
Mitigation
If you can’t patch tonight, do this now.
Restrict access to the application to trusted users until a fix is applied. Employ web application firewalls (WAF) with rules to detect and block SQL injection attempts. Regularly monitor logs for suspicious activity targeting the 'photo_id' parameter.
Remediation
Patch, then assume compromise.
Upgrade to a fixed version of Terong PHP Photo Gallery, if available. If no patch is available, modify the application code to properly sanitize and parameterize all user-supplied input, especially the 'photo_id' parameter, to prevent SQL injection. Use prepared statements or ORM frameworks that abstract SQL queries.
Exploits
No validated public exploits yet. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2008-1875 exploited in the wild?
- As of Oct 16, 2026, Mallory has no reports of CVE-2008-1875 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2008-1875?
- Yes. As of Oct 16, 2026, Mallory has reports of a public exploit for CVE-2008-1875.
- Is there a patch for CVE-2008-1875?
- Upgrade to a fixed version of Terong PHP Photo Gallery, if available. If no patch is available, modify the application code to properly sanitize and parameterize all user-supplied input, especially the 'photo_id' parameter, to prevent SQL injection.
- What products are affected by CVE-2008-1875?
- Terong Advanced Web Photo Gallery.
- How severe is CVE-2008-1875?
- CVE-2008-1875 has a CVSS v2 score of 7.5 (High) and an EPSS score of 0.97% (63rd percentile) as of Oct 16, 2026.
Recent activity
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.