← Back to CVE Explorer

CVE-2026-42197

Full vulnerability record from the local CVENow database.

Description

RELATE is a web-based courseware package. Versions prior to commit 555f0efb1c5bd7531c07cd73724d7e566a81f620 have a stored cross-site scripting vulnerability that allows any enrolled student to execute arbitrary JavaScript in an administrator's browser session, potentially leading to full admin account takeover. The `get_user()` method in `ParticipationAdmin` renders user-controlled input using `mark_safe` combined with Python's % string formatting. This bypasses Django\'s automatic HTML escaping entirely. The value returned by `get_full_name` is derived directly from the `first_name` and `last_name` fields of the User model. These fields are freely editable by any authenticated user through the profile page (`/profile/`) with no sanitization applied. When an admin views the Participation list in the Django admin panel, the unsanitized value is rendered directly into the HTML response, causing the injected script to execute in the admin's browser. Commit 555f0efb1c5bd7531c07cd73724d7e566a81f620 fixes the issue.

Severity
HIGH
CVSS score
8.7 (v3.1)
Vulnerability status
Deferred
Source identifier
Published
2026-05-27 20:16:36.260000
Last modified
2026-10-26 11:10:00.157000
View original CVE JSON
{
  "id": "CVE-2026-42197",
  "sourceIdentifier": "[email protected]",
  "published": "2026-05-27T20:16:36.260",
  "lastModified": "2026-10-26T11:10:00.157",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "RELATE is a web-based courseware package. Versions prior to commit 555f0efb1c5bd7531c07cd73724d7e566a81f620 have a stored cross-site scripting vulnerability that allows any enrolled student to execute arbitrary JavaScript in an administrator's browser session, potentially leading to full admin account takeover. The `get_user()` method in `ParticipationAdmin` renders user-controlled input using `mark_safe` combined with Python's % string formatting. This bypasses Django\\'s automatic HTML escaping entirely. The value returned by `get_full_name` is derived directly from the `first_name`  and `last_name` fields of the User model. These fields are freely editable by any authenticated user through the profile page (`/profile/`) with no sanitization applied. When an admin views the Participation list in the Django admin panel, the unsanitized value is rendered directly into the HTML response, causing the injected script to execute in the admin's browser. Commit 555f0efb1c5bd7531c07cd73724d7e566a81f620 fixes the issue."
    },
    {
      "lang": "es",
      "value": "RELATE es un paquete de software educativo basado en la web. Las versiones anteriores al commit 555f0efb1c5bd7531c07cd73724d7e566a81f620 tienen una vulnerabilidad de cross-site scripting almacenado que permite a cualquier estudiante matriculado ejecutar JavaScript arbitrario en la sesión del navegador de un administrador, lo que podría llevar a la toma de control total de la cuenta de administrador. El método get_user() en ParticipationAdmin renderiza la entrada controlada por el usuario utilizando mark_safe combinado con el formato de cadena % de Python. Esto elude completamente el escape automático de HTML de Django. El valor devuelto por get_full_name se deriva directamente de los campos first_name y last_name del modelo User. Estos campos son libremente editables por cualquier usuario autenticado a través de la página de perfil (/profile/) sin ninguna sanitización aplicada. Cuando un administrador ve la lista de Participación en el panel de administración de Django, el valor no sanitizado se renderiza directamente en la respuesta HTML, haciendo que el script inyectado se ejecute en el navegador del administrador. El commit 555f0efb1c5bd7531c07cd73724d7e566a81f620 soluciona el problema."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "inducer",
          "product": "relate",
          "versions": [
            {
              "version": "< 555f0efb1c5bd7531c07cd73724d7e566a81f620",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N",
          "baseScore": 8.7,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "REQUIRED",
          "scope": "CHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "HIGH",
          "availabilityImpact": "NONE"
        },
        "exploitabilityScore": 2.3,
        "impactScore": 5.8
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-05-28T13:24:29.221132Z",
          "id": "CVE-2026-42197",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "total"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-79"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/inducer/relate/blob/550b8c54eb4d5f3e5f6698dcba361bf34d715599/course/admin.py#L347-L368",
      "source": "[email protected]"
    },
    {
      "url": "https://github.com/inducer/relate/commit/555f0efb1c5bd7531c07cd73724d7e566a81f620",
      "source": "[email protected]"
    },
    {
      "url": "https://github.com/inducer/relate/security/advisories/GHSA-37xm-vhx8-g6w3",
      "source": "[email protected]"
    }
  ]
}