Executive brief
LearnPress, a popular WordPress plugin used for creating and selling online courses, contains a security flaw that allows users with contributor-level access or higher to inject malicious scripts into website pages. These scripts execute automatically when other users, including administrators, visit the affected pages. This could lead to unauthorized actions being performed on behalf of visitors or the theft of sensitive session information.
Technical details
The LearnPress plugin for WordPress is vulnerable to Stored Cross-Site Scripting (XSS) in versions up to and including 4.4.0. The vulnerability exists within the FilterCourseTemplate::sections() method, where the 'class_wrapper_form' shortcode attribute is inserted into an HTML class attribute via sprintf() without proper esc_attr() escaping. Because the FilterCourseShortcode::render() handler fails to apply shortcode_atts() filtering, raw user-supplied attributes are passed directly into the template. Authenticated attackers with contributor-level permissions or higher can exploit this to inject arbitrary web scripts that execute in the context of any user viewing the affected page. A patch has been released in subsequent versions.
Affected products
- Thimpress LearnPress – WordPress LMS Plugin for Create and Sell Online Courses <= 4.4.0
Timeline
- 2026-07-01: disclosed
- 2026-07-01: advisory
References
- https://plugins.trac.wordpress.org/browser/learnpress/tags/4.4.0/inc/Shortcodes/Course/FilterCourseShortcode.php
- https://plugins.trac.wordpress.org/browser/learnpress/tags/4.4.0/inc/TemplateHooks/Course/FilterCourseTemplate.php
- https://plugins.trac.wordpress.org/changeset?sfp_email=&sfph_mail=&reponame=&old=3587186%40learnpress&new=3587186%40learnpress&sfp_email=&sfph_mail=
- https://www.wordfence.com/threat-intel/vulnerabilities/id/09c8db69-60fa-4087-9096-5d34ce44f616?source=cve