---
id: CVE-2022-51023
title: PHPOK < 5.4.081 SQL Injection via api.php sort Parameter
summary: >-
  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
  extractv…
severity: high
cvss: 8.2
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N'
cvssSource: cna
cwe:
  - CWE-89
vendor: PHPOK
product: PHPOK
affected:
  - PHPOK >= 4.5.000 < 5.4.081
published: '2026-10-22'
updated: '2026-10-22'
sourceUpdated: '2026-10-22T10:57:33.897Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2022-51023'
references:
  - url: 'https://github.com/qinggan/phpok/commit/d70c396f'
    label: Fix Commit
  - url: >-
      https://github.com/projectdiscovery/nuclei-templates/blob/main/http/vulnerabilities/other/phpok-sqli.yaml
    label: Nuclei Template
  - url: >-
      https://www.vulncheck.com/advisories/phpok-5.4.081-sql-injection-via-api-php-sort-parameter
    label: >-
      VulnCheck Advisory: PHPOK < 5.4.081 SQL Injection via api.php sort
      Parameter
tags:
  - cve.org
ingestedAt: '2026-10-22T11:37:02.340Z'
---

## Overview

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.

## Affected

- `PHPOK >= 4.5.000 < 5.4.081`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
