CVE-2008-1502: Moodle/moodle Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-v759-3wr5-p294
CWE-79
Published
Advisory Summary

CVE-2008-1502 is a MODERATE cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Moodle/moodle libraries in the Packagist ecosystem. The issue involves moodle vulnerable to cross-site scripting. Remediation is available by upgrading affected packages to version 1.8.5.

CVE-2008-1502 at a Glance

CVE Identifier CVE-2008-1502
GHSA Identifier GHSA-v759-3wr5-p294
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Moodle/moodle
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2008-1502

To remediate this vulnerability, upgrade all affected Moodle/moodle dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

moodle/moodle fixed: 1.8.5
Upgrade moodle/moodle to 1.8.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for moodle/moodle

How to Check if You Are Affected

To determine whether your application is affected by CVE-2008-1502, inspect your project dependencies for Moodle/moodle:

inspect dependencies for moodle/moodle

Analyze the terminal output to locate any version of Moodle/moodle in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.8.5), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Moodle/moodle, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The `_bad_protocol_once` function in `phpgwapi/inc/class.kses.inc.php` in KSES, as used in eGroupWare before 1.4.003, Moodle before 1.8.5, and other products, allows remote attackers to bypass HTML filtering and conduct cross-site scripting (XSS) attacks via a string containing crafted URL protocols.

CVE-2008-1502 Affected Moodle/moodle Versions

1 component(s)
Fixed Versions:
1.8.5
Product / Package Ecosystem Affected Versions Fixed Version
moodle/moodle
Packagist
< 1.8.5
1.8.5

References

NVD — CVE-2008-1502 NVD
https://nvd.nist.gov/vuln/detail/CVE-2008-1502
exchange.xforce.ibmcloud.com/vulnerabilities/414... WEB
https://exchange.xforce.ibmcloud.com/vulnerabilities/41435
Moodle/moodle Source Repository REPOSITORY
https://github.com/moodle/moodle
usn.ubuntu.com/658-1 WEB
https://usn.ubuntu.com/658-1
Moodle/moodle Security Information SECURITY
https://web.archive.org/web/20080709031015/http://www.securityfocus.com/bid/28424
web.archive.org/web/20080828131802/... WEB
https://web.archive.org/web/20080828131802/http://secunia.com/advisories/31017
web.archive.org/web/20080905011948/... WEB
https://web.archive.org/web/20080905011948/http://secunia.com/advisories/31018
web.archive.org/web/20081011001554/... WEB
https://web.archive.org/web/20081011001554/http://secunia.com/advisories/31167
web.archive.org/web/20081025081058/... WEB
https://web.archive.org/web/20081025081058/http://secunia.com/advisories/32400
web.archive.org/web/20081028073531/... WEB
https://web.archive.org/web/20081028073531/http://secunia.com/advisories/32446
web.archive.org/web/20090129193143/... WEB
https://web.archive.org/web/20090129193143/http://secunia.com/advisories/30986
web.archive.org/web/20100819022833/... WEB
https://web.archive.org/web/20100819022833/http://secunia.com/advisories/30073
web.archive.org/web/20120719035305/... WEB
https://web.archive.org/web/20120719035305/http://secunia.com/advisories/29491
www.redhat.com/archives/fedora-pac... WEB
https://www.redhat.com/archives/fedora-package-announce/2008-July/msg00331.html
docs.moodle.org/en/release_notes WEB
http://docs.moodle.org/en/Release_Notes#Moodle_1.8.5
Moodle/moodle Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2008-07/msg00006.html
Moodle/moodle Security Information SECURITY
http://www.debian.org/security/2008/dsa-1691
Moodle/moodle Security Information SECURITY
http://www.debian.org/security/2009/dsa-1871
www.egroupware.org/changelog WEB
http://www.egroupware.org/changelog
www.egroupware.org/viewvc/branches/1.4... WEB
http://www.egroupware.org/viewvc/branches/1.4/phpgwapi/inc/class.kses.inc.php?r1=23625&r2=25110&pathrev=25110
Moodle/moodle Security Information SECURITY
http://www.gentoo.org/security/en/glsa/glsa-200805-04.xml
Moodle/moodle Security Information SECURITY
http://www.openwall.com/lists/oss-security/2008/07/08/14

Frequently Asked Questions

What is CVE-2008-1502?
CVE-2008-1502 is a security vulnerability in Moodle/moodle involving Moodle vulnerable to Cross-site scripting under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Moodle/moodle versions are affected?
Affected versions include releases prior to 1.8.5 across affected packages: moodle/moodle.
What version fixes CVE-2008-1502?
Upgrading to 1.8.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is moodle/moodle affected?
Yes, moodle/moodle is affected in releases prior to 1.8.5. Upgrade your dependency to 1.8.5 or later.
What CWE is associated with CVE-2008-1502?
CVE-2008-1502 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Packagist dependencies for CVE-2008-1502?
Run the dependency tree command: 'inspect dependencies for moodle/moodle'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-v759-3wr5-p294",
  "modified" : "2024-02-09T15:44:56Z",
  "published" : "2022-05-01T23:40:50Z",
  "aliases" : [ "CVE-2008-1502" ],
  "summary" : "Moodle vulnerable to Cross-site scripting",
  "details" : "The `_bad_protocol_once` function in `phpgwapi/inc/class.kses.inc.php` in KSES, as used in eGroupWare before 1.4.003, Moodle before 1.8.5, and other products, allows remote attackers to bypass HTML filtering and conduct cross-site scripting (XSS) attacks via a string containing crafted URL protocols.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "moodle/moodle"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.8.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2008-1502"
  }, {
    "type" : "WEB",
    "url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/41435"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/moodle/moodle"
  }, {
    "type" : "WEB",
    "url" : "https://usn.ubuntu.com/658-1"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20080709031015/http://www.securityfocus.com/bid/28424"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20080828131802/http://secunia.com/advisories/31017"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20080905011948/http://secunia.com/advisories/31018"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20081011001554/http://secunia.com/advisories/31167"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20081025081058/http://secunia.com/advisories/32400"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20081028073531/http://secunia.com/advisories/32446"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20090129193143/http://secunia.com/advisories/30986"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20100819022833/http://secunia.com/advisories/30073"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20120719035305/http://secunia.com/advisories/29491"
  }, {
    "type" : "WEB",
    "url" : "https://www.redhat.com/archives/fedora-package-announce/2008-July/msg00331.html"
  }, {
    "type" : "WEB",
    "url" : "http://docs.moodle.org/en/Release_Notes#Moodle_1.8.5"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2008-07/msg00006.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2008/dsa-1691"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2009/dsa-1871"
  }, {
    "type" : "WEB",
    "url" : "http://www.egroupware.org/changelog"
  }, {
    "type" : "WEB",
    "url" : "http://www.egroupware.org/viewvc/branches/1.4/phpgwapi/inc/class.kses.inc.php?r1=23625&r2=25110&pathrev=25110"
  }, {
    "type" : "WEB",
    "url" : "http://www.gentoo.org/security/en/glsa/glsa-200805-04.xml"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2008/07/08/14"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-09T15:44:56Z",
    "nvd_published_at" : "2008-03-25T19:44:00Z"
  }
}