Sploitus

Exploit for CVE-2026-76569

githubexploit Β· 2026-08-31

Exploit Code

README113 lines
## https://sploitus.com/exploit?id=AC02CD58-CB4D-5B08-AEA0-5E0D170F0392
# Reflected XSS via search GET Parameter in Phoca Download

**Phoca Download ≀ 6.1.4 β€” Authenticated Attacker Executes Arbitrary JavaScript via Crafted Search URL in User Control Panel**

![CVE](https://img.shields.io/badge/CVE-CVE--2026--76569-green)
![CVSS v4.0](https://img.shields.io/badge/CVSS_v4.0-5.3-orange)
![CWE-79](https://img.shields.io/badge/CWE--79-Cross--site_Scripting-orange)
![Affected](https://img.shields.io/badge/Affected-%E2%89%A4_6.1.4-red)
![Researcher](https://img.shields.io/badge/Researcher-Toan_Le-blue)

---

## SUMMARY

Phoca Download (`com_phocadownload`) for Joomla contains a reflected Cross-Site Scripting (XSS) vulnerability in the User Control Panel file search functionality. The `search` GET parameter is processed with Joomla's `'string'` filter β€” which calls `strip_tags()` only and preserves the `"` character β€” then echoed without `htmlspecialchars()` into an HTML `` attribute. An attacker can inject arbitrary HTML attributes and event handlers that execute in the victim's browser upon page load, without requiring any user interaction beyond clicking a crafted link.

---

## AFFECTED VERSIONS

| COMPONENT         | VULNERABLE | TESTED ON                                     | FIXED |
| ----------------- | ---------- | --------------------------------------------- | ----- |
| com_phocadownload | ≀ 6.1.4   | Joomla 5 + PhocaDownload 6.1.4 + MariaDB 10.6 | 6.1.5 |

---

## VULNERABILITY DETAILS

**Type:** Reflected Cross-Site Scripting (CWE-79)
**Authentication required:** Registered Joomla user (logged in) + User Control Panel enabled (`enable_user_cp = 1`)
**CSRF token required:** Not required β€” GET request, no CSRF token checked on this path
**Sink file:** `site/views/user/tmpl/default_files_bootstrap.php`

### Root Cause

The `search` parameter is read using Joomla's `'string'` filter, which only calls `strip_tags()`. This preserves the `"` character, allowing an attacker to break out of the `value=""` attribute context and inject arbitrary HTML attributes.

**SITE/VIEWS/USER/VIEW.HTML.PHP:252 β€” SOURCE**

```php
$search_files = $app->getUserStateFromRequest(
    $this->_context_files.'.search', 'search', '', 'string'
);
$search_files = StringHelper::strtolower($search_files);
$lists_files['search'] = $search_files;  // stored without encoding
```

**SITE/VIEWS/USER/TMPL/DEFAULT_FILES_BOOTSTRAP.PHP:56 β€” SINK (VULNERABLE)**

```php
t['listsfiles']['search'];?>"
    class="form-control" />
```

The sibling view `phocadownloadlinkfile` (same extension) correctly applies `PhocaDownloadUtils::filterValue($search, 'text')` β€” equivalent to `htmlspecialchars()` β€” for the same search field. The `user` view does not apply the same protection, indicating inconsistent output encoding within the extension.

---

## PROOF OF CONCEPT

#### 1. Log in as a Registered User

Navigate to the Joomla login page and authenticate as a Registered user. After successful login, Joomla redirects to the user profile page, confirming an active session.

![Successful login as testuser β€” redirected to profile page](images/s1-step1-login-as-registered-user.png)

#### 2. Access the User Control Panel (Baseline)

Navigate to the PhocaDownload User Control Panel:

```
http://TARGET/index.php?option=com_phocadownload&view=user
```

The page renders with an empty search field (`value=""`). This is the normal state before injection.

![User Control Panel β€” empty search field, baseline state](images/s1-step2-user-control-panel-baseline.png)

#### 3. Submit Crafted URL with XSS Payload

Navigate to the following crafted URL (or type the raw payload directly into the search box):

```
http://TARGET/index.php?option=com_phocadownload&view=user&search=%22%20autofocus%20onfocus%3Dalert%28document.domain%29%20x%3D
```

![Crafted URL with XSS payload submitted to search parameter](images/s1-step3-crafted-url-with-payload.png)

As the page loads, the injected `autofocus` attribute focuses the input element, immediately triggering the `onfocus` event handler. No further user interaction is required.

**Rendered HTML (vulnerable):**

```html

```

---

## IMPACT

1. **Session Hijacking** β€” An attacker can steal the victim's Joomla session cookie via `document.cookie`, enabling full account takeover without credentials.
2. **Arbitrary JavaScript Execution** β€” Any JavaScript executes in the victim's browser session β€” keylogging, DOM manipulation, credential harvesting, and redirects to phishing pages are all possible.
3. **Privilege Escalation** β€” If an administrator clicks the crafted link while authenticated, the attacker gains admin-level JavaScript execution, potentially enabling full site compromise via administrative panel actions.

---

## REFERENCES

- **CVE:** https://vulners.com/cve/CVE-2026-76569
- **NVD:** https://nvd.nist.gov/vuln/detail/CVE-2026-76569
- **GitHub Advisory:** https://github.com/advisories/GHSA-99wr-9r6w-w242
- **Vendor Repository:** https://github.com/PhocaDesign/PhocaDownload