GHSA-f25v-x6vr-962g: Pheditor Authentication Bypass Vulnerability

CRITICAL
CVSS 10.0
CWE-1392
Published
Advisory Summary

GHSA-f25v-x6vr-962g is a CRITICAL (CVSS 10.0) authentication bypass vulnerability (CWE-1392: Use of Default Credentials) affecting Pheditor libraries in the Packagist ecosystem. The issue involves authentication bypass in forced password-change flow via unverified current password. Remediation is available by upgrading affected packages to version 2.0.8.

GHSA-f25v-x6vr-962g at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-f25v-x6vr-962g
Severity CRITICAL
CVSS v3.1 Base Score 10.0
CWE Classification CWE-1392: Use of Default Credentials
Affected Product Pheditor
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 10.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix GHSA-f25v-x6vr-962g

To remediate this vulnerability, upgrade all affected Pheditor dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

pheditor/pheditor fixed: 2.0.8
Upgrade pheditor/pheditor to 2.0.8
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for pheditor/pheditor

How to Check if You Are Affected

To determine whether your application is affected by GHSA-f25v-x6vr-962g, inspect your project dependencies for Pheditor:

inspect dependencies for pheditor/pheditor

Analyze the terminal output to locate any version of Pheditor in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.8), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1392: Use of Default Credentials, where the product uses default credentials (such as passwords or cryptographic keys) for potentially critical functionality. In Pheditor, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary The forced password-change flow, triggered when the stored password is still the default (`admin`), does not verify that the password submitted by the client actually matches the current password. Any non-empty value in `pheditor_password` is enough to reach the password-change form, and submitting `pheditor_new_password` / `pheditor_confirm_password` in the same request is enough to set an arbitrary new password and obtain an authenticated session — without ever proving knowledge of the current password. ## Root Cause `pheditor.php` line 163: ```php if (PASSWORD == hash('sha512', 'admin')) { // still default — force change prompt ``` This checks whether the **stored** `PASSWORD` constant is still the default value. It does not check whether the **submitted** `pheditor_password` matches it. As a result, on any instance that hasn't changed the default password, the check passes regardless of what the client actually sends, and the subsequent password-change branch is reachable without authentication. ## PoC ```bash TARGET="https://victim.com/pheditor.php" # Any non-empty value works here — password is never actually verified curl -c /tmp/j.txt \ -d 'pheditor_password=anything' \ -d 'pheditor_new_password=attacker123' \ -d 'pheditor_confirm_password=attacker123' \ "$TARGET" -L -s -o /dev/null # Session is now authenticated as admin, with the password changed to attacker123 ``` ## Impact On any instance where the default password has not yet been changed, an unauthenticated attacker can set an arbitrary new admin password and obtain a fully authenticated session, without knowing the current password. This is a complete authentication bypass, not merely "default credentials in use" — it holds even if the operator believes the instance is protected because the login form is present. ## Remediation Verify the submitted password against the stored `PASSWORD` constant *before* entering the forced password-change branch, so the flow is reachable only by someone who actually knows the current password: ```php $submitted_hash = hash('sha512', $_POST['pheditor_password']); if (PASSWORD == hash('sha512', 'admin') && $submitted_hash === PASSWORD) { // proceed to forced password-change flow } else { // treat as a normal login attempt (including rate-limiting) } ``` ## Note on scope The original report submitted alongside this finding also included two additional items: - **Unrestricted PHP upload** — addressed as intended behavior (Pheditor is a single-admin PHP file editor; PHP file creation/editing is core to its function, and pattern-restricting only the upload path doesn't reduce risk since the same result is reachable via the `save`/`newfile` action). Documented explicitly in the README's new Security Model section. - **Terminal allowlist bypass (`php -r ...`)** — a duplicate of a previously reported and already-patched issue (GHSA-g3hq-hphg-8fhh, fixed in v2.0.7). This advisory has been scoped to the authentication bypass specifically, since it's a distinct root cause from both of those. Full responses to all three points are in the comments below.

GHSA-f25v-x6vr-962g Affected Pheditor Versions

1 component(s)
Fixed Versions:
2.0.8
Product / Package Ecosystem Affected Versions Fixed Version
pheditor/pheditor
Packagist
< 2.0.8
2.0.8

References

Frequently Asked Questions

What is GHSA-f25v-x6vr-962g?
GHSA-f25v-x6vr-962g is a security vulnerability in Pheditor involving Authentication Bypass in Forced Password-Change Flow via Unverified Current Password under CWE-1392: Use of Default Credentials.
Which Pheditor versions are affected?
Affected versions include releases prior to 2.0.8 across affected packages: pheditor/pheditor.
What version fixes GHSA-f25v-x6vr-962g?
Upgrading to 2.0.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pheditor/pheditor affected?
Yes, pheditor/pheditor is affected in releases prior to 2.0.8. Upgrade your dependency to 2.0.8 or later.
What is the CVSS score of GHSA-f25v-x6vr-962g?
GHSA-f25v-x6vr-962g has a CVSS v3.1 base score of 10.0 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with GHSA-f25v-x6vr-962g?
GHSA-f25v-x6vr-962g is classified under CWE-1392: Use of Default Credentials (The product uses default credentials (such as passwords or cryptographic keys) for potentially critical functionality.).
How can I check Packagist dependencies for GHSA-f25v-x6vr-962g?
Run the dependency tree command: 'inspect dependencies for pheditor/pheditor'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-f25v-x6vr-962g",
  "modified" : "2026-07-24T21:54:24Z",
  "published" : "2026-07-24T21:54:24Z",
  "aliases" : [ ],
  "summary" : "Pheditor: Authentication Bypass in Forced Password-Change Flow via Unverified Current Password",
  "details" : "## Summary\n\nThe forced password-change flow, triggered when the stored password is still the default (`admin`), does not verify that the password submitted by the client actually matches the current password. Any non-empty value in `pheditor_password` is enough to reach the password-change form, and submitting `pheditor_new_password` / `pheditor_confirm_password` in the same request is enough to set an arbitrary new password and obtain an authenticated session — without ever proving knowledge of the current password.\n\n## Root Cause\n\n`pheditor.php` line 163:\n\n```php\nif (PASSWORD == hash('sha512', 'admin')) { // still default — force change prompt\n```\n\nThis checks whether the **stored** `PASSWORD` constant is still the default value. It does not check whether the **submitted** `pheditor_password` matches it. As a result, on any instance that hasn't changed the default password, the check passes regardless of what the client actually sends, and the subsequent password-change branch is reachable without authentication.\n\n## PoC\n\n```bash\nTARGET=\"https://victim.com/pheditor.php\"\n\n# Any non-empty value works here — password is never actually verified\ncurl -c /tmp/j.txt \\\n  -d 'pheditor_password=anything' \\\n  -d 'pheditor_new_password=attacker123' \\\n  -d 'pheditor_confirm_password=attacker123' \\\n  \"$TARGET\" -L -s -o /dev/null\n\n# Session is now authenticated as admin, with the password changed to attacker123\n```\n\n## Impact\n\nOn any instance where the default password has not yet been changed, an unauthenticated attacker can set an arbitrary new admin password and obtain a fully authenticated session, without knowing the current password. This is a complete authentication bypass, not merely \"default credentials in use\" — it holds even if the operator believes the instance is protected because the login form is present.\n\n## Remediation\n\nVerify the submitted password against the stored `PASSWORD` constant *before* entering the forced password-change branch, so the flow is reachable only by someone who actually knows the current password:\n\n```php\n$submitted_hash = hash('sha512', $_POST['pheditor_password']);\n\nif (PASSWORD == hash('sha512', 'admin') && $submitted_hash === PASSWORD) {\n    // proceed to forced password-change flow\n} else {\n    // treat as a normal login attempt (including rate-limiting)\n}\n```\n\n## Note on scope\n\nThe original report submitted alongside this finding also included two additional items:\n\n- **Unrestricted PHP upload** — addressed as intended behavior (Pheditor is a single-admin PHP file editor; PHP file creation/editing is core to its function, and pattern-restricting only the upload path doesn't reduce risk since the same result is reachable via the `save`/`newfile` action). Documented explicitly in the README's new Security Model section.\n- **Terminal allowlist bypass (`php -r ...`)** — a duplicate of a previously reported and already-patched issue (GHSA-g3hq-hphg-8fhh, fixed in v2.0.7).\n\nThis advisory has been scoped to the authentication bypass specifically, since it's a distinct root cause from both of those. Full responses to all three points are in the comments below.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "pheditor/pheditor"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/pheditor/pheditor/security/advisories/GHSA-f25v-x6vr-962g"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pheditor/pheditor/commit/0978bcda644832b67357340e2f271e32d86fdf86"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pheditor/pheditor"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pheditor/pheditor/releases/tag/2.0.8"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1392" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-24T21:54:24Z",
    "nvd_published_at" : null
  }
}