phat
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    ## CVE-2026-2942 WordPress ProSolution WP Client Plugin <= 1.9.9 is vulnerable to a high priority Arbitrary File Upload ![image](https://hackmd.io/_uploads/H1U8cLt2Wl.png) ## Overview - **Published:** 2026-04-08 -** CVE-ID:** CVE-2026-2942 - **CVSS:** 9.8 Critical - **Affected Plugin:** ProSolution WP Client Plugin - **Affected Versions:** <= 1.9.9 - **CWE:** CWE-434 Unrestricted Upload of File with Dangerous Type ## Description The ProSolution WP Client plugin for WordPress is vulnerable to arbitrary file uploads due to missing file type validation in the 'proSol_fileUploadProcess' function in all versions up to, and including, 1.9.9. This makes it possible for unauthenticated attackers to upload arbitrary files on the affected site's server which may make remote code execution possible. ## Patch And Commit Analysis ![image](https://hackmd.io/_uploads/HJjprCt2bl.png) ### Comparison of Versions 1.9.9 and 2.0.0** - **Version 1.9.9 (Vulnerable)**: This release lacked proper security validation on the side dish page’s file upload functionality. As a result, it was susceptible to an Arbitrary File Upload vulnerability, allowing attackers to upload malicious files and potentially execute arbitrary code on the server. - **Version 2.0.0 (Patched):** The changelog highlights a critical fix: “SECURITY UPDATE: add security validation to prevent arbitrary files upload on side dish page.” In this version, developers introduced robust security checks to validate uploaded files, effectively mitigating the Arbitrary File Upload risk. ### Patch Diff **Input handling (FILES) :** - **1.9.9 :** ![image](https://hackmd.io/_uploads/H1rjQkc2We.png) - **2.0.0 :** ![image](https://hackmd.io/_uploads/B10671c3Zl.png) At the input handling stage, the vulnerable version does not check whether a file exists. This allows attackers to directly call the endpoint without providing a file, leading to undefined behavior. In the patched version, a validation check is added to ensure the file input exists, preventing direct abuse of the AJAX endpoint. **File name & tmp validation :** - **1.9.9 :** ![image](https://hackmd.io/_uploads/BJo1r19h-e.png) - **2.0.0 :** ![image](https://hackmd.io/_uploads/BkZMSkc3bx.png) In the vulnerable version, there is no validation for the filename, temporary file path, or upload legitimacy. This allows attackers to upload malicious files without restriction. In contrast, the patched version introduces sanitize_file_name() to prevent malicious filenames and path traversal, and is_uploaded_file() to ensure the file was uploaded via HTTP POST. These changes help prevent file spoofing and LFI-related attacks. **Extension validation logic :** - **1.9.9 :** ![image](https://hackmd.io/_uploads/ryvsiJchWl.png) - **2.0.0 :** ![image](https://hackmd.io/_uploads/Byzpjkchbg.png) In the vulnerable version, the file extension is derived from the MIME type provided by the client. Since the MIME type is user-controlled, an attacker can bypass validation by setting the Content-Type to a trusted value such as image/jpeg while uploading a malicious file (e.g., a PHP shell). In the patched version, the extension is extracted from the filename on the server side and validated against a strict whitelist. If the extension does not match the whitelist, the upload process is terminated. **MIME validation :** - **1.9.9 :** ![image](https://hackmd.io/_uploads/r1YT01c3Zl.png) - **2.0.0 :** ![image](https://hackmd.io/_uploads/HyFA0kq3Ze.png) In the vulnerable version, MIME type validation relies on client-supplied data, which is not trustworthy and can be easily manipulated by an attacker. In the patched version, the application uses FILEINFO_MIME_TYPE to detect the actual MIME type based on the file’s content (magic bytes). This ensures that the file type is validated on the server side and cannot be spoofed via HTTP headers. **WordPress MIME validation :** - **2.0.0 :** ![image](https://hackmd.io/_uploads/H1_Cye9nbx.png) In the patched version, an additional MIME validation layer is introduced using WordPress core functionality. This provides a defense-in-depth mechanism to further verify the file type. **EXT ↔ MIME consistency check :** - **2.0.0 :** ![image](https://hackmd.io/_uploads/SkNB-l9hWg.png) The patched version introduces a whitelist-based validation that ensures the file extension matches the actual MIME type. After determining the real MIME type using magic bytes, the application compares it against a predefined mapping. This prevents bypass techniques such as polyglot files or malicious files disguised with safe extensions (e.g., renaming a PHP shell to .jpg). **Image content validation :** - **2.0.0 :** ![image](https://hackmd.io/_uploads/rkIHQe52Zg.png) The patch also adds image content validation by checking the image structure using functions such as getimagesize(). This helps detect invalid or malformed image files, preventing attacks that rely on fake image headers. **Response validation :** - **1.9.9 :** ![image](https://hackmd.io/_uploads/r1DzDe93Wg.png) - **2.0.0 :** ![image](https://hackmd.io/_uploads/rknDwgqnWl.png) In the vulnerable version, the response validation logic is weak (!= ''). In the patched version, this is improved by using !empty(), which is a safer and more reliable way to validate the response object. **Final extension re-check :** - **1.9.9 :** ![image](https://hackmd.io/_uploads/Bkhr_x92Zg.png) - **2.0.0 :** ![image](https://hackmd.io/_uploads/rJOPOg53bg.png) The vulnerable version does not perform any validation after the upload process is completed. It directly uses the file extension, which can be unsafe when combined with weak validation logic. In the patched version, the extension is re-validated after upload using the whitelist. This additional check helps prevent bypass techniques such as handler-based manipulation or race condition attacks. **Dangerous function removed + Error handling :** ![image](https://hackmd.io/_uploads/rJxCtl93-l.png) In the patched version, the developers removed the insecure proSol_mimeExt function and introduced proper error handling. This improves both security and code reliability by eliminating unsafe logic and ensuring consistent error responses. ## Root Cause Analysis The core issue lies in how the proSol_fileUploadProcess function handled file uploads — trusting user-supplied data at every validation step instead of performing server-side verification. There are three fundamental failures that make this vulnerability trivially exploitable: - **Client-controlled MIME type validation** The vulnerable version derived the file extension from the Content-Type header supplied by the client. Since this header is fully attacker-controlled, setting it to image/jpeg while uploading a PHP file is enough to bypass the check entirely. - **No server-side extension whitelist** There was no validation against an allowed extension list after the file was received. The application accepted whatever extension the attacker provided in the filename, with no cross-check against actual file content. - **No authentication on the AJAX endpoint** The proSol_fileUploadProcess handler was registered without any capability or nonce check, meaning any unauthenticated user could call it directly — no WordPress account required. The combination of these three weaknesses means an attacker can upload a PHP webshell by simply spoofing the Content-Type header, with no prior access or credentials needed. ## Attack Flow ![mermaid-diagram](https://hackmd.io/_uploads/Sknval5hWx.png) ## POC Proof Of Concept **Exploitation Steps :** The vulnerable AJAX handler accepts file uploads without any authentication or file type validation. We craft a multipart POST request, setting the Content-Type to image/jpeg to pass the weak client-side MIME check, while the actual payload is a PHP webshell. ![image](https://hackmd.io/_uploads/BJSJSE5n-e.png) The server processes the file without validating the actual extension or MIME type, and responds with the uploaded file's location: ```json { "newfilename": "66c87e2bbe.php", "url": "http://localhost/wp-content/uploads/prosolwpclient/66c87e2bbe.php" } ``` With the webshell now living on the server, we simply call it with our desired command via the cmd parameter : ```text GET /wp-content/uploads/prosolwpclient/66c87e2bbe.php?cmd=ls ``` The server executes the command and returns the output directly in the response body, confirming full RCE under the web server's user context. ![image](https://hackmd.io/_uploads/HJgtr453Ze.png) This confirms full RCE is achievable with zero prior access, requiring no WordPress account or special privileges.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully