Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-68423

Scripts should not execute locally when sent via messaging

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Waiting for integration review
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.8 regressions, 3.9 regressions
    • Fix Version/s: None
    • Component/s: Messages
    • Sprint:
      Moodle 3.9 - Moppies Kanban

      Description

      Currently, if you input JavaScript in messaging, it is stripped on output, but is being executed locally (self-XSS) when the send button is pressed. A similar bug was fixed in Moodle 3.5.2 (MDL-61359), but this version appears to have been introduced in 3.8.

      Steps to reproduce:

      1. Log in as a student.
      2. Open the messaging drawer, and open a conversation with yourself or another user.
      3. Paste the follwing into the messaging input:
        <script>alert(123)</script>
      4. Press send.
      5. See "123" appear in an alert popup on the sender's screen.

      Note: This has not been flagged as a security issue, as it is only executed on the sender's side, and only when the message is initially sent - the sender never re-executes the script, and the message is escaped before being shown to the recipient.

      Tested on 3.6, 3.7, 3.8 and master (3.9) - only 3.8 onwards appear to be affected.

       

      (Originally reported on SF case 00066905)

        Attachments

          Activity

            People

            Assignee:
            tusefomal Ferran Recio
            Reporter:
            michaelh Michael Hawkins
            Peer reviewer:
            Víctor Déniz Falcón
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 5 hours, 30 minutes
                1d 5h 30m