{"id":"CVE-2022-51023","kind":"vulnerability","aliases":["CVE-2022-51023"],"related":[],"title":"PHPOK: unauthenticated SQL injection in sort parameter leaks database data","description":"PHPOK 4.5.000 before 5.4.081 contains an SQL injection vulnerability that allows unauthenticated attackers to manipulate ORDER BY clauses via the sort parameter. Attackers can send GET requests to /api.php?c=project&f=index with extractvalue payloads in sort to extract database information through error messages. Exploitation evidence was first observed by the Shadowserver Foundation on 2023-10-14.","summary":"PHPOK versions 4.5.000 through 5.4.080 let anonymous visitors inject SQL through the sort parameter of /api.php?c=project&f=index. An attacker can pull database contents out through error messages.","severity":"high","cvss":8.8,"epss":0.00262,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["package","php","phpok","self-hosted"],"not_affected_if":["default-config"],"how_to_check":"Check the PHPOK version in the admin panel or install files; versions from 4.5.000 up to but not including 5.4.081 are affected.\nSend a GET to /api.php?c=project&f=index with a sort value containing extractvalue( and look for database error output.","fix":"Upgrade PHPOK to 5.4.081 or later.\nIf upgrading is not possible, block requests with sort parameters containing SQL syntax at the web server or WAF.","status":"open","published_at":"2026-10-22T11:17:05+00:00","first_seen_at":"2026-10-23T21:57:30+00:00","triaged_at":"2026-10-23T22:32:29+00:00","updated_at":"2026-10-24T07:15:51+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-23T22:32:29Z","model":"claude-haiku-5-5","output":{"fix":"Upgrade PHPOK to 5.4.081 or later.\nIf upgrading is not possible, block requests with sort parameters containing SQL syntax at the web server or WAF.","reach":"internet","title":"PHPOK: unauthenticated SQL injection in sort parameter leaks database data","impact":"medium","summary":"PHPOK versions 4.5.000 through 5.4.080 let anonymous visitors inject SQL through the sort parameter of /api.php?c=project&f=index. An attacker can pull database contents out through error messages.","category":"package","who_cares":["php","phpok","self-hosted"],"confidence":0.8,"needs_auth":"no","worst_case":"Anonymous attackers read database contents, possibly including password hashes.","analyst_note":"Exploitation was observed by Shadowserver on 2023-10-14; confirm the affected version range and whether the patched release is 5.4.081 from the vendor changelog.","how_to_check":"Check the PHPOK version in the admin panel or install files; versions from 4.5.000 up to but not including 5.4.081 are affected.\nSend a GET to /api.php?c=project&f=index with a sort value containing extractvalue( and look for database error output.","needs_analyst":true,"not_affected_if":["default-config"],"user_interaction":"no","needs_special_setup":"no","severity_if_unknown":"high"},"cost_usd":0.000536,"input_tokens":2977,"output_tokens":477,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-10':109C '-14':110C '-2022':12A,15A '-51023':13A,16A '/api.php':38B,81C '2023':108C '4.5.000':25B,54C '5.4.080':27B '5.4.081':56C 'allow':63C 'anonym':29B 'attack':44B,65C,75C 'c':39B,82C 'claus':70C 'contain':57C 'content':48B 'cve':11A,14A 'data':10A 'databas':9A,47B,93C 'error':51B,96C 'evid':99C 'exploit':98C 'extract':92C 'extractvalu':87C 'f':41B,84C 'first':101C 'foundat':106C 'get':78C 'host':22B 'index':42B,85C 'inform':94C 'inject':4A,31B,60C 'leak':8A 'let':28B 'manipul':67C 'messag':52B,97C 'observ':102C 'order':68C 'packag':17B 'paramet':7A,36B,74C 'payload':88C 'php':18B 'phpok':1A,19B,23B,53C 'project':40B,83C 'pull':46B 'request':79C 'self':21B 'self-host':20B 'send':77C 'shadowserv':105C 'sort':6A,35B,73C,90C 'sql':3A,32B,59C 'unauthent':2A,64C 'version':24B 'via':71C 'visitor':30B 'vulner':61C","nicknames":[],"mitigations":[],"who_affected":null,"tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-22T11:17:05+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"disclosure@vulncheck.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2022-51023","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-51023","severity":null,"published_at":"2026-10-22T11:17:05+00:00","modified_at":"2026-10-22T17:40:46+00:00","first_seen_at":"2026-10-23T21:57:30+00:00","fetched_at":"2026-10-23T22:29:02+00:00","note":null},{"source":"epss","external_id":"CVE-2022-51023","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-51023","severity":null,"published_at":null,"modified_at":null,"first_seen_at":"2026-10-24T07:15:51+00:00","fetched_at":"2026-10-25T12:38:51+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}