{"metadata": {"vulnerability": "CVE-2020-28138", "count": 18, "kinds": {"milestone": 4, "sighting": 3, "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-28138", "field": "cveMetadata.dateReserved"}, {"timestamp": "2020-11-17T18:56:20Z", "date_only": false, "value": "2020-11-17T18:56:20.000Z", "kind": "milestone", "label": "Published", "source": "cvelistv5", "record": "CVE-2020-28138", "field": "cveMetadata.datePublished", "metric_role": "disclosure", "metric_basis": "recorded_event"}, {"timestamp": "2020-11-17T18:56:20Z", "date_only": false, "value": "2020-11-17T18:56:20.000Z", "kind": "other", "label": "Updated", "source": "cvelistv5 / mitre", "record": "CVE-2020-28138", "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-XXQR-HJ46-74WW", "record": "GHSA-XXQR-HJ46-74WW", "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-28138", "record": "GSD-2020-28138", "field": "namespaces.nvd.nist.gov.publishedDate", "linked_record": true}, {"timestamp": "2020-11-17T19:15:11.530Z", "date_only": false, "value": "2020-11-17T19:15:11.530", "kind": "milestone", "label": "Published", "source": "fkie_nvd \u00b7 FKIE_CVE-2020-28138", "record": "FKIE_CVE-2020-28138", "field": "published", "metric_role": "disclosure", "metric_basis": "recorded_event", "linked_record": true}, {"timestamp": "2020-11-17T22:39:27Z", "date_only": false, "value": "2020-11-17T22:39:27.000000Z", "kind": "sighting", "label": "Seen", "source": "https://t.me/cibsecurity/16472", "record": "CVE-2020-28138", "field": "creation_timestamp", "uuid": "1b1e678e-08ff-4b85-9d6b-bc679267b376", "content": "\u203c CVE-2020-28138 \u203c\n\nSourceCodester Online Clothing Store 1.0 is affected by a SQL Injection via the txtUserName parameter to login.php.\n\n\ud83d\udcd6 Read\n\nvia \"National Vulnerability Database\".", "url": "https://t.me/cibsecurity/16472"}, {"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-28138", "record": "GSD-2020-28138", "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-66078", "record": "CNVD-2020-66078", "field": "openTime", "linked_record": true}, {"timestamp": "2020-11-24T00:00:00Z", "date_only": true, "value": "2020-11-24", "kind": "other", "label": "Submit Time", "source": "cnvd \u00b7 CNVD-2020-66078", "record": "CNVD-2020-66078", "field": "submitTime", "linked_record": true}, {"timestamp": "2020-12-09T04:25:19Z", "date_only": false, "value": "2020-12-09T04:25:19.000000Z", "kind": "sighting", "label": "Seen", "source": "https://t.me/cibsecurity/17356", "record": "CVE-2020-28138", "field": "creation_timestamp", "uuid": "33ce6ae9-b440-4f52-a546-8659c3378c41", "content": "\u203c CVE-2020-28138 \u203c\n\nSourceCodester Online Clothing Store 1.0 is affected by a SQL Injection via the txtUserName parameter to login.php.\n\n\ud83d\udcd6 Read\n\nvia \"National Vulnerability Database\".", "url": "https://t.me/cibsecurity/17356"}, {"timestamp": "2022-05-24T17:34:32Z", "date_only": false, "value": "2022-05-24T17:34:32Z", "kind": "milestone", "label": "Published", "source": "github \u00b7 GHSA-XXQR-HJ46-74WW", "record": "GHSA-XXQR-HJ46-74WW", "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-XXQR-HJ46-74WW", "record": "GHSA-XXQR-HJ46-74WW", "field": "modified", "linked_record": true}, {"timestamp": "2023-12-13T01:22:01.262Z", "date_only": false, "value": "2023-12-13T01:22:01.262801Z", "kind": "other", "label": "Updated", "source": "gsd \u00b7 GSD-2020-28138", "record": "GSD-2020-28138", "field": "gsd.osvSchema.modified", "linked_record": true}, {"timestamp": "2024-08-04T16:33:57.791Z", "date_only": false, "value": "2024-08-04T16:33:57.791Z", "kind": "other", "label": "Updated", "source": "cvelistv5", "record": "CVE-2020-28138", "field": "cveMetadata.dateUpdated"}, {"timestamp": "2024-08-04T16:33:57.791Z", "date_only": false, "value": "2024-08-04T16:33:57.791Z", "kind": "other", "label": "Updated", "source": "cvelistv5 / CVE", "record": "CVE-2020-28138", "field": "containers.adp.0.providerMetadata.dateUpdated"}, {"timestamp": "2026-06-17T03:10:08.490Z", "date_only": false, "value": "2026-06-17T03:10:08.490", "kind": "other", "label": "Updated", "source": "fkie_nvd \u00b7 FKIE_CVE-2020-28138", "record": "FKIE_CVE-2020-28138", "field": "lastModified", "linked_record": true}, {"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-28138", "field": "creation_timestamp", "uuid": "e680dadd-1361-4340-826f-d3bc6539493a", "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:08:53.749Z", "anchors": {"origin": {"timestamp": "2020-11-17T18:56:20Z", "date_only": false, "value": "2020-11-17T18:56:20.000Z", "kind": "milestone", "label": "Published", "source": "cvelistv5", "record": "CVE-2020-28138", "field": "cveMetadata.datePublished", "metric_role": "disclosure", "metric_basis": "recorded_event"}, "discovery": null, "report": null, "acknowledgement": null, "disclosure": {"timestamp": "2020-11-17T18:56:20Z", "date_only": false, "value": "2020-11-17T18:56:20.000Z", "kind": "milestone", "label": "Published", "source": "cvelistv5", "record": "CVE-2020-28138", "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": 189382353.749524, "hours": 52606.20937486778, "days": 2191.925390619491, "min_seconds": 189382353.749524, "max_seconds": 189382353.749524, "approximate": false, "ongoing": true, "order_known": true, "batch_listing": false, "end_before_start": false, "start": {"timestamp": "2020-11-17T18:56:20Z", "date_only": false, "value": "2020-11-17T18:56:20.000Z", "kind": "milestone", "label": "Published", "source": "cvelistv5", "record": "CVE-2020-28138", "field": "cveMetadata.datePublished", "metric_role": "disclosure", "metric_basis": "recorded_event"}, "end": {"timestamp": "2026-11-18T17:08:53.749Z", "date_only": false, "label": "As of", "source": "Calculation clock"}}, "exploitation_to_patch": {"available": false, "missing": ["start"]}, "exploit_publication_to_patch": {"available": false, "missing": ["start"]}}}
