InjectionWeakness · CWE-74

CVE-2026-7130

HIGH · 7.3 CVSS v3.1 Published 2026-04-27
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
82/100
Remediation priority · High
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
A flaw has been found in SourceCodester Pharmacy Sales and Inventory System 1.0. The affected element is an unknown function of the file /ajax.php?action=delete_category. Executing a manipulation of the argument ID can lead to sql injection. The attack may be performed from remote. The exploit has been published and may be used.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

SQL injection vulnerability in SourceCodester Pharmacy Sales and Inventory System 1.0 allows remote attackers to inject arbitrary SQL commands via the ID parameter in the /ajax.php?action=delete_category endpoint. The application fails to sanitize user input before using it in SQL queries.

MitigationReplace dynamic SQL queries with prepared statements/parameterized queries for the ID parameter in the delete_category function. Consider implementing input validation and least-privilege database accounts.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Confirm the application version
    Locate and inspect the version information file in the SourceCodester Pharmacy Sales and Inventory System installation directory, or check any About/Version page within the application UI. Compare against version 1.0.
    Affected if The installed version is 1.0 (the only affected version listed)
  2. Verify the ajax.php endpoint exists
    Check for the presence of the file ajax.php in the web root or application directory of the Pharmacy Sales and Inventory System installation.
    Affected if The ajax.php file exists and is accessible via the web server
  3. Locate the delete_category action handler
    Open ajax.php and search for the code block handling 'delete_category' under the action parameter. Note how the ID parameter is processed and used in database queries.
    Affected if The delete_category action is present and processes the ID parameter without visible input sanitization or parameterized queries
  4. Inspect SQL query construction for the ID parameter
    Within the delete_category code block, examine how the ID parameter value is incorporated into the SQL query. Look for direct string concatenation or interpolation of the ID into the query without using prepared statements or escaping functions.
    Affected if The ID parameter is used directly in SQL query construction without sanitization, prepared statements, or parameter binding
  5. Check if the endpoint is accessible
    Attempt to access or probe the endpoint /ajax.php?action=delete_category to confirm it is reachable and processes requests. This may require authenticated access depending on application configuration.
    Affected if The endpoint responds and processes the ID parameter without validation

A user is affected if they are running SourceCodester Pharmacy Sales and Inventory System version 1.0 and the ajax.php file contains the delete_category action that directly uses the ID parameter in unsanitized SQL queries.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Replace dynamic SQL queries with prepared statements/parameterized queries for the ID parameter in the delete_category function. Consider implementing input validation and least-privilege database accounts.

Recommended fix Moderate confidence
  1. 1. Access the server hosting the SourceCodester Pharmacy Sales and Inventory System and locate the file `ajax.php` in the web root.
  2. 2. Open `ajax.php` and find the code block that handles the `delete_category` action (e.g., `if(isset($_GET['action']) && $_GET['action'] == 'delete_category')`).
  3. 3. Identify the SQL query that directly uses the `id` parameter (for example: `DELETE FROM categories WHERE id = " . $_GET['id']`).
  4. 4. Replace the dynamic SQL with a prepared statement. Using MySQLi: `$stmt = $conn->prepare("DELETE FROM categories WHERE id = ?"); $stmt->bind_param("i", $id);`. Using PDO: `$stmt = $pdo->prepare("DELETE FROM categories WHERE id = :id"); $stmt->bindParam(':id', $id, PDO::PARAM_INT);`.
  5. 5. Sanitize the input by casting the `id` to an integer: `$id = isset($_GET['id']) ? intval($_GET['id']) : 0;` (or use `filter_var($_GET['id'], FILTER_VALIDATE_INT)`).
  6. 6. Execute the prepared statement with the sanitized `$id`.
  7. 7. Save the modified `ajax.php` and test the fix: call `/ajax.php?action=delete_category&id=1` (should delete the category) and attempt `/ajax.php?action=delete_category&id=1 OR 1=1` (should fail or return no data).
  8. 8. Deploy the patched file to production and verify that the SQL injection vulnerability is no longer present.

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation3.0 h
  • Implementation2.0 h
  • Testing2.0 h
  • Review / QA1.0 h
8.0 hours of engineering $1,440
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,304.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-7130 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-7130 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data