{"metadata": {"vulnerability": "CVE-2020-28139", "count": 19, "kinds": {"milestone": 4, "sighting": 4, "kev": 0, "other": 11}, "linked_omitted": 0}, "data": [{"timestamp": "2020-11-02T00:00:00Z", "date_only": false, "value": "2020-11-02T00:00:00.000Z", "kind": "milestone", "label": "Reserved", "source": "cvelistv5", "record": "CVE-2020-28139", "field": "cveMetadata.dateReserved"}, {"timestamp": "2020-11-17T18:58:49Z", "date_only": false, "value": "2020-11-17T18:58:49.000Z", "kind": "milestone", "label": "Published", "source": "cvelistv5", "record": "CVE-2020-28139", "field": "cveMetadata.datePublished", "metric_role": "disclosure", "metric_basis": "recorded_event"}, {"timestamp": "2020-11-17T18:58:49Z", "date_only": false, "value": "2020-11-17T18:58:49.000Z", "kind": "other", "label": "Updated", "source": "cvelistv5 / mitre", "record": "CVE-2020-28139", "field": "containers.cna.providerMetadata.dateUpdated"}, {"timestamp": "2020-11-17T19:15:00Z", "date_only": false, "value": "2020-11-17T19:15:00Z", "kind": "other", "label": "Nvd published at", "source": "github \u00b7 GHSA-2JG8-C8Q8-842V", "record": "GHSA-2JG8-C8Q8-842V", "field": "database_specific.nvd_published_at", "linked_record": true}, {"timestamp": "2020-11-17T19:15:00Z", "date_only": false, "value": "2020-11-17T19:15Z", "kind": "other", "label": "Published Date", "source": "gsd \u00b7 GSD-2020-28139", "record": "GSD-2020-28139", "field": "namespaces.nvd.nist.gov.publishedDate", "linked_record": true}, {"timestamp": "2020-11-17T19:15:11.577Z", "date_only": false, "value": "2020-11-17T19:15:11.577", "kind": "milestone", "label": "Published", "source": "fkie_nvd \u00b7 FKIE_CVE-2020-28139", "record": "FKIE_CVE-2020-28139", "field": "published", "metric_role": "disclosure", "metric_basis": "recorded_event", "linked_record": true}, {"timestamp": "2020-11-17T22:39:21Z", "date_only": false, "value": "2020-11-17T22:39:21.000000Z", "kind": "sighting", "label": "Seen", "source": "https://t.me/cibsecurity/16467", "record": "CVE-2020-28139", "field": "creation_timestamp", "uuid": "9bd1924f-e322-4769-b35e-ca866c6f497c", "content": "\u203c CVE-2020-28139 \u203c\n\nSourceCodester Online Clothing Store 1.0 is affected by a cross-site scripting (XSS) vulnerability via a Offer Detail field in offer.php.\n\n\ud83d\udcd6 Read\n\nvia \"National Vulnerability Database\".", "url": "https://t.me/cibsecurity/16467"}, {"timestamp": "2020-11-18T00:00:00Z", "date_only": true, "value": "2020-11-18", "kind": "other", "label": "Submit Time", "source": "cnvd \u00b7 CNVD-2020-66091", "record": "CNVD-2020-66091", "field": "submitTime", "linked_record": true}, {"timestamp": "2020-11-23T15:27:00Z", "date_only": false, "value": "2020-11-23T15:27Z", "kind": "other", "label": "Last Modified Date", "source": "gsd \u00b7 GSD-2020-28139", "record": "GSD-2020-28139", "field": "namespaces.nvd.nist.gov.lastModifiedDate", "linked_record": true}, {"timestamp": "2020-11-24T00:00:00Z", "date_only": true, "value": "2020-11-24", "kind": "other", "label": "Open Time", "source": "cnvd \u00b7 CNVD-2020-66091", "record": "CNVD-2020-66091", "field": "openTime", "linked_record": true}, {"timestamp": "2020-12-09T04:25:13Z", "date_only": false, "value": "2020-12-09T04:25:13.000000Z", "kind": "sighting", "label": "Seen", "source": "https://t.me/cibsecurity/17351", "record": "CVE-2020-28139", "field": "creation_timestamp", "uuid": "f3a19bc5-caa7-481b-8228-f68747d52ca9", "content": "\u203c CVE-2020-28139 \u203c\n\nSourceCodester Online Clothing Store 1.0 is affected by a cross-site scripting (XSS) vulnerability via a Offer Detail field in offer.php.\n\n\ud83d\udcd6 Read\n\nvia \"National Vulnerability Database\".", "url": "https://t.me/cibsecurity/17351"}, {"timestamp": "2022-05-24T17:34:32Z", "date_only": false, "value": "2022-05-24T17:34:32Z", "kind": "milestone", "label": "Published", "source": "github \u00b7 GHSA-2JG8-C8Q8-842V", "record": "GHSA-2JG8-C8Q8-842V", "field": "published", "metric_role": "disclosure", "metric_basis": "recorded_event", "linked_record": true}, {"timestamp": "2022-05-24T17:34:32Z", "date_only": false, "value": "2022-05-24T17:34:32Z", "kind": "other", "label": "Updated", "source": "github \u00b7 GHSA-2JG8-C8Q8-842V", "record": "GHSA-2JG8-C8Q8-842V", "field": "modified", "linked_record": true}, {"timestamp": "2023-12-13T01:22:01.854Z", "date_only": false, "value": "2023-12-13T01:22:01.854256Z", "kind": "other", "label": "Updated", "source": "gsd \u00b7 GSD-2020-28139", "record": "GSD-2020-28139", "field": "gsd.osvSchema.modified", "linked_record": true}, {"timestamp": "2024-08-04T16:33:57.777Z", "date_only": false, "value": "2024-08-04T16:33:57.777Z", "kind": "other", "label": "Updated", "source": "cvelistv5", "record": "CVE-2020-28139", "field": "cveMetadata.dateUpdated"}, {"timestamp": "2024-08-04T16:33:57.777Z", "date_only": false, "value": "2024-08-04T16:33:57.777Z", "kind": "other", "label": "Updated", "source": "cvelistv5 / CVE", "record": "CVE-2020-28139", "field": "containers.adp.0.providerMetadata.dateUpdated"}, {"timestamp": "2026-06-17T03:10:08.593Z", "date_only": false, "value": "2026-06-17T03:10:08.593", "kind": "other", "label": "Updated", "source": "fkie_nvd \u00b7 FKIE_CVE-2020-28139", "record": "FKIE_CVE-2020-28139", "field": "lastModified", "linked_record": true}, {"timestamp": "2026-11-12T15:54:18Z", "date_only": false, "value": "2026-11-12T15:54:18.000000Z", "kind": "sighting", "label": "Seen", "source": "https://gist.github.com/LMortalv/8d559bc0455be45d03cad77496934c88", "record": "CVE-2020-28139", "field": "creation_timestamp", "uuid": "3f797202-d96b-46b2-a9a3-e87d62d3548a", "content": "# Stored Cross-Site Scripting in SourceCodester Online Clothing Store 1.0 - Donate-Items.php / Edit-Items.php\n\n## Summary\n\nA stored cross-site scripting (XSS) vulnerability exists in **SourceCodester Online Clothing Store 1.0**. User-supplied fields in `Donate-Items.php` are stored without HTML escaping and rendered directly in multiple pages, including the administrative review list (`Edit-Items.php`). The `TYPE` field is placed inside a single-quoted `img src` attribute, allowing an attacker to break out of the attribute and inject arbitrary script. Because the administrative backend lacks authorization (separate issue), an anonymous attacker can submit a malicious donation and achieve zero-interaction script execution in the administrator's browser.\n\n- **Vendor:** SourceCodester\n- **Product:** Online Clothing Store\n- **Version:** 1.0\n- **Vulnerability Class:** Stored Cross-Site Scripting (CWE-79)\n- **Affected Endpoints:** `Donate-Items.php` (entry), `Edit-Items.php` / `View-Items.php` / `view-donations.php` (sinks)\n- **Authentication Required:** No (for submission)\n- **Primary PoC Status:** Statically confirmed; runtime payload delivery not executed under read-only scope\n- **Severity:** High\n\n## Product Reference\n\n- Download page: https://download.code-projects.org/details/a9d7cf0f-685e-4a30-a932-3943bc02ba46\n\n## Test Environment\n\n- Apache 2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a\n- PHP 7.0.9 NTS (fcgid)\n- MySQL 5.7.26\n- Target URL: `http://127.0.0.1/`\n\n## Vulnerability Details\n\n`Donateitem()` in `Functions_Def.php` accepts nine POST fields from `Donate-Items.php`, including `DESCRIPTION`, `TYPE`, `BRAND`, `SIZE`, `GENDER`, and `ITEM_CONDITION`. These values are inserted into the `item` table without any HTML escaping.\n\nA source-wide search confirms that `htmlspecialchars` is not used anywhere in the application:\n\n```text\ngrep -rn 'htmlspecialchars' --include=*.php .\n# zero hits\n```\n\nThe stored values are then echoed directly into HTML in multiple output points:\n\n| Output point | Fields rendered |\n|---|---|\n| `Functions_Def.php:301-307` | Administrative pending-review list: `ITEM_ID`, `DESCRIPTION`, `TYPE`, `SIZE`, `BRAND`, `GENDER`, `ASKING_PRICE` |\n| `Functions_Def.php:361-382` | Item listing: `TYPE`, `ITEM_CONDITION`, `BRAND`, `DESCRIPTION`, `SIZE`, `VALUE` |\n| `Functions_Def.php:427-434` | Cart listing: same fields |\n| `Functions_Def.php:784-786` | Donations page: all fields |\n| `Functions_Def.php:833-839` | Orders page: all fields |\n\n## Primary PoC: B-02 Attribute-Context XSS via `TYPE`\n\nThe strongest and most differentiated vector is the `TYPE` field in the item image tag:\n\n```php\n// Functions_Def.php:382\n\n```\n\n`TYPE` is taken from user input at `Donateitem()` (`:640`) and is concatenated inside a **single-quoted attribute value**. A single quote in `TYPE` terminates the `src` attribute and allows arbitrary event handlers to be appended.\n\n### Payload\n\nSubmit a donation with:\n\n```text\nTYPE = x' onerror='alert(document.domain)\n```\n\nThe rendered HTML becomes:\n\n```html\n\n```\n\nWhen an administrator or any visitor opens the pending-review list (`Edit-Items.php`) or the item listing (`View-Items.php`), the `onerror` handler executes in their browser context.\n\nBecause `Edit-Items.php` is reachable without authentication (see the separate missing-authorization report), the attack chain requires no victim interaction beyond loading the page:\n\n1. Anonymous attacker submits a donation with the crafted `TYPE`.\n2. Administrator (or any visitor) opens `Edit-Items.php` or `View-Items.php`.\n3. Script executes; the attacker can read cookies, perform administrative actions, or exfiltrate data.\n\n### Secondary Vector: `DESCRIPTION` in HTML Context\n\nIf a shorter payload is needed, `DESCRIPTION` is a `varchar(40)` field rendered in plain HTML context. A payload such as:\n\n```html\n\n```\n\nfits within 40 characters and executes when the description is rendered in `View-Items.php` or `Edit-Items.php`.\n\n## Distinction from CVE-2020-28139\n\nCVE-2020-28139 covers a cross-site scripting vulnerability via the **Offer Detail field in `offer.php`**. The present report covers a different entry point (`Donate-Items.php`), different stored fields (`TYPE`, `DESCRIPTION`, `BRAND`, etc.), different sink pages (`Edit-Items.php`, `View-Items.php`), and a distinct **attribute-context** vector (`img src` single-quote breakout) that is not described in CVE-2020-28139.\n\nThese are separate code paths with separate root causes: CVE-2020-28139 is specific to `offer.php`'s Offer Detail field, while this issue affects the item donation and review workflow. A remediation that fixes `offer.php` does not address `Donate-Items.php` or the `img src` attribute context.\n\n## Root Cause\n\nThe application performs zero output encoding. Values from `$_POST` are stored verbatim in MySQL and echoed verbatim into HTML, including inside quoted attributes. There is no `htmlspecialchars($value, ENT_QUOTES, 'UTF-8')` call anywhere in the codebase.\n\n## Impact\n\nAn unauthenticated attacker can inject persistent script into pages viewed by administrators and other users. Because the administrative backend is also unprotected (separate missing-authorization issue), the script can perform privileged actions in the administrator's session without any user interaction. This can lead to:\n\n1. Session hijacking (reading cookies, though `HttpOnly` is also absent).\n2. Administrative actions (reprice items, approve listings, delete data) performed via the victim's browser.\n3. Defacement or redirection of the item listing pages.\n\n## Suggested Remediation\n\n1. Apply `htmlspecialchars($value, ENT_QUOTES, 'UTF-8')` to every output of user-controlled data.\n2. For `TYPE`, `GENDER`, and similar enum-like fields, validate against a strict whitelist before storage and rendering.\n3. Add a Content-Security-Policy header (`default-src 'self'`) to mitigate residual XSS risk.\n4. Enforce authorization on `Edit-Items.php` so that the stored payload cannot reach an administrative session without login.\n\n## Disclosure and Testing Scope\n\nThis vulnerability was identified through complete source-to-sink static analysis. Under the read-only testing scope, no malicious payload was written to the database and no script execution was triggered at runtime. The PoC is based on verified line numbers and the confirmed absence of output encoding across the codebase.\n\n## Timeline\n\n- 2026-11-12: Vulnerability identified and statically confirmed during source audit.\n- 2026-11-12: Output points and attribute context verified in `Functions_Def.php`.\n\n## Reporter\n\nThis issue is intended for coordinated disclosure with the vendor and VulDB.", "url": "https://gist.github.com/LMortalv/8d559bc0455be45d03cad77496934c88"}, {"timestamp": "2026-11-12T15:56:19Z", "date_only": false, "value": "2026-11-12T15:56:19.000000Z", "kind": "sighting", "label": "Seen", "source": "https://gist.github.com/LMortalv/f2aa50ca82149b1913b16b2458f8cf69", "record": "CVE-2020-28139", "field": "creation_timestamp", "uuid": "d9f52d36-e9fc-414f-b8ca-70fe3eb2b791", "content": "# Cross-Site Request Forgery in SourceCodester Online Clothing Store 1.0 - All State-Changing Forms\n\n## Summary\n\nA cross-site request forgery (CSRF) vulnerability exists in **SourceCodester Online Clothing Store 1.0**. All state-changing operations \u2014 user registration, adding items to cart, order placement, and administrative item review/pricing \u2014 are performed without any anti-CSRF token, Origin/Referer validation, or SameSite cookie attribute. A malicious third-party page can automatically submit crafted forms on behalf of an authenticated victim, causing unauthorized business operations without the victim's knowledge.\n\n- **Vendor:** SourceCodester\n- **Product:** Online Clothing Store\n- **Version:** 1.0\n- **Vulnerability Class:** Cross-Site Request Forgery (CWE-352)\n- **Affected Endpoints:** `Sign-up.php`, `View-Items.php` (add to cart), `view-cart.php` (order/delete), `Edit-Items.php` (admin review/repricing), `Donate-Items.php`\n- **Authentication Required:** Victim session (no attacker authentication needed)\n- **Primary PoC Status:** Statically confirmed; no session cookie attributes verified at runtime\n- **Severity:** High\n\n## Product Reference\n\n- Download page: https://download.code-projects.org/details/a9d7cf0f-685e-4a30-a932-3943bc02ba46\n\n## Test Environment\n\n- Apache 2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a\n- PHP 7.0.9 NTS (fcgid)\n- MySQL 5.7.26\n- Target URL: `http://127.0.0.1/`\n\n## Vulnerability Details\n\nEvery state-changing form in the application lacks a per-request anti-CSRF token. A source-wide review of all `` elements confirms that no hidden token field is emitted:\n\n| File | Line | Action | Hidden token? |\n|---|---|---|---|\n| `index.php` | 87, 104, 183 | Login, add to cart, order | No |\n| `Edit-Items.php` | 68 | Administrative review / repricing | No |\n| `view-cart.php` | 12 | Delete / order items | No |\n| `Donate-Items.php` | 86 | Submit donation | No |\n| `Sign-up.php` | 79 | Register account | No |\n| `Admin-Login.php` | 28 | Administrator login | No |\n\nThe only hidden field present anywhere in the application is `Functions_Def.php:376` (`itemId`), which is a business parameter, not a CSRF token.\n\nIn addition, no Origin or Referer header validation is performed in any POST handler. The application has no middleware, no framework, and no global request filter.\n\n### Session Cookie Attributes\n\nRuntime verification of the `Set-Cookie` header on `index.php` confirms:\n\n```http\nHTTP/1.1 200 OK\nServer: Apache/2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a\nX-Powered-By: PHP/7.0.9\nSet-Cookie: PHPSESSID=; path=/\nContent-Type: text/html; charset=UTF-8\n```\n\nThe cookie has no `SameSite` attribute, no `HttpOnly`, and no `Secure`. Without `SameSite`, browsers will attach the session cookie to cross-site requests by default, making the CSRF attacks below directly viable.\n\n## Primary PoC: CSRF Against Order Placement (`view-cart.php`)\n\n`updateOrder()` in `Functions_Def.php:474-515` accepts `deleteId[]` directly from the client and processes the order without any token check. A malicious page can force an authenticated victim's browser to submit the following form:\n\n```html\n\n  \n    \n\n      \n      \n    \n  \n\n```\n\nWhen a logged-in victim visits this page, the browser sends the POST request with the victim's `PHPSESSID` cookie attached. `updateOrder()` executes: it updates the item status, deletes the cart entry, and inserts a `buy` record \u2014 all without the victim's consent and without any token validation.\n\nBecause `updateOrder()` also lacks cart ownership and item status checks (see the separate missing-authorization report), the attacker can use this CSRF vector to force the victim to \"purchase\" items that are not even in the victim's cart.\n\n## Secondary PoC: CSRF Against Administrative Repricing (`Edit-Items.php`)\n\n`Edit-Items.php` renders a pricing form at `:68` and accepts POST to `updateItems()` without a token. Because `Edit-Items.php` also lacks authentication (see the separate missing-authorization report), the practical attacker model is even simpler: the attacker does not even need a victim session \u2014 they can POST directly. However, in deployments where authorization is later added but CSRF protection is not, a cross-site form would still be viable:\n\n```html\n\n\n  \n  \n  \n\n```\n\nThis would set the item's `value` field to `1`, repricing the item to an arbitrarily low amount. The payload matches the exact parameter names used in `Functions_Def.php:181`.\n\n## Additional Affected Forms\n\n- `Sign-up.php`: registration can be triggered cross-site, creating unwanted accounts.\n- `View-Items.php`: adding items to the victim's cart can be performed cross-site.\n- `Donate-Items.php`: unwanted donations can be submitted under the victim's identity.\n\nAll share the same root cause: no anti-CSRF token and no SameSite cookie attribute.\n\n## Root Cause\n\n1. No anti-CSRF token is generated, stored in the session, or validated on any POST handler.\n2. No Origin or Referer validation is performed.\n3. The session cookie is set without `SameSite`, so browsers attach it to cross-site requests by default.\n4. The application is a plain PHP application with no framework-provided CSRF middleware.\n\n## Impact\n\nAn unauthenticated attacker can host a malicious page that, when visited by a logged-in user or administrator, silently performs state-changing operations under the victim's identity:\n\n1. Place unauthorized orders (`view-cart.php`).\n2. Reprice items to attacker-chosen values (`Edit-Items.php`).\n3. Register unwanted accounts (`Sign-up.php`).\n4. Submit unwanted donations or cart additions.\n\nCombined with the missing authorization and missing output encoding issues, CSRF amplifies the attack surface: an attacker can chain a cross-site form submission with stored XSS to achieve persistent administrative actions.\n\n## Distinction from Existing CVEs\n\nThis issue is distinct from the existing CVE entries for this product:\n\n- **CVE-2020-28138** concerns SQL injection in the product.\n- **CVE-2020-28139** concerns cross-site scripting via the `offer.php` Offer Detail field.\n- **CVE-2026-19903** concerns direct download of a static `.sql` backup file.\n\nNone of them cover the absence of anti-CSRF tokens or the missing `SameSite` cookie attribute. The root cause here is the complete absence of request-origin validation on state-changing operations (CWE-352), which requires a distinct remediation (token generation/validation, `SameSite=Lax` cookie configuration, Origin/Referer checks).\n\n## Suggested Remediation\n\n1. Generate a per-session anti-CSRF token, embed it as a hidden field in every state-changing form, and validate it on every POST handler before processing.\n2. Set `session_set_cookie_params(['samesite' =&gt; 'Lax', 'httponly' =&gt; true, 'secure' =&gt; true])` before `session_start()`.\n3. Add Origin/Referer validation for all state-changing requests as a defense-in-depth measure.\n4. Add authorization checks to `Edit-Items.php` and ownership checks to `updateOrder()` so that CSRF, even if present, cannot reach privileged functionality without a valid, authorized session.\n\n## Disclosure and Testing Scope\n\nThis vulnerability was identified through complete source review of all `\n` elements and all POST handlers. No cross-site page was hosted against a victim session at runtime; the PoC HTML above is constructed from the exact form field names and action URLs found in the source. The session cookie attributes were confirmed at runtime via the `Set-Cookie` response header, which shows no `SameSite`, `HttpOnly`, or `Secure`.\n\n## Timeline\n\n- 2026-11-12: All state-changing forms and POST handlers reviewed; absence of CSRF tokens confirmed.\n- 2026-11-12: Session cookie attributes confirmed at runtime (no SameSite).\n\n## Reporter\n\nThis issue is intended for coordinated disclosure with the vendor and VulDB.", "url": "https://gist.github.com/LMortalv/f2aa50ca82149b1913b16b2458f8cf69"}], "metrics": {"as_of": "2026-11-18T17:18:26.494Z", "anchors": {"origin": {"timestamp": "2020-11-17T18:58:49Z", "date_only": false, "value": "2020-11-17T18:58:49.000Z", "kind": "milestone", "label": "Published", "source": "cvelistv5", "record": "CVE-2020-28139", "field": "cveMetadata.datePublished", "metric_role": "disclosure", "metric_basis": "recorded_event"}, "discovery": null, "report": null, "acknowledgement": null, "disclosure": {"timestamp": "2020-11-17T18:58:49Z", "date_only": false, "value": "2020-11-17T18:58:49.000Z", "kind": "milestone", "label": "Published", "source": "cvelistv5", "record": "CVE-2020-28139", "field": "cveMetadata.datePublished", "metric_role": "disclosure", "metric_basis": "recorded_event"}, "exploit_publication": null, "exploitation": null, "patch": null}, "vendor_response_time": {"available": false, "missing": ["start", "end"]}, "time_to_exploit": {"available": false, "missing": ["end"]}, "disclosure_to_exploit": {"available": false, "missing": ["end"]}, "disclosure_to_exploit_publication": {"available": false, "missing": ["end"]}, "time_to_patch": {"available": false, "missing": ["start", "end"]}, "total_time_to_patch": {"available": false, "missing": ["start", "end"]}, "disclosure_to_patch": {"available": false, "missing": ["end"]}, "time_unpatched": {"available": true, "seconds": 189382777.494943, "hours": 52606.32708192861, "days": 2191.9302950803585, "min_seconds": 189382777.494943, "max_seconds": 189382777.494943, "approximate": false, "ongoing": true, "order_known": true, "batch_listing": false, "end_before_start": false, "start": {"timestamp": "2020-11-17T18:58:49Z", "date_only": false, "value": "2020-11-17T18:58:49.000Z", "kind": "milestone", "label": "Published", "source": "cvelistv5", "record": "CVE-2020-28139", "field": "cveMetadata.datePublished", "metric_role": "disclosure", "metric_basis": "recorded_event"}, "end": {"timestamp": "2026-11-18T17:18:26.494Z", "date_only": false, "label": "As of", "source": "Calculation clock"}}, "exploitation_to_patch": {"available": false, "missing": ["start"]}, "exploit_publication_to_patch": {"available": false, "missing": ["start"]}}}
