Skip to content

GHSA-92wp-r7hm-42g7 CVE-2023-26470

XWiki Platform subject to Uncontrolled Resource Consumption

High Maven
Severity
5.7 / 10
High · CVSS 3.1
Exploit chance (EPSS)
0.85%
Chance of exploitation in the next 30 days. Higher than 58.38% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-400 Uncontrolled Resource Consumption
CWE-787 Out-of-bounds Write
Fix
14.0-rc-1
Upgrade org.xwiki.platform:xwiki-platform-oldcore to this version or later

Description

Impact

It's possible to make the farm unusable by adding an object to a page with a huge number (e.g. 67108863). This will most of the time fill the memory allocated to XWiki and make it unusable every time this document is manipulated.

Patches

It has been patched in XWiki 14.0

Workarounds

There is no workaround.

References

https://jira.xwiki.org/browse/XWIKI-19223

For more information

If you have any questions or comments about this advisory:

Affected versions

Maven

PackageVulnerableFixed in
org.xwiki.platform:xwiki-platform-oldcore
< 14.0-rc-1
14.0-rc-1

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

org.xwiki.platform:xwiki-platform-oldcore Maven → 14.0-rc-1

maven
<dependency><groupId>org.xwiki.platform</groupId><artifactId>xwiki-platform-oldcore</artifactId><version>14.0-rc-1</version></dependency>
gradle
implementation("org.xwiki.platform:xwiki-platform-oldcore:14.0-rc-1")

Severity breakdown

CVSS 3.1 5.7

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Weakness

CWE-400: Uncontrolled Resource Consumption

The product does not properly control the allocation and maintenance of a limited resource.

How to prevent it
  • Architecture and Design: Design throttling mechanisms into the system architecture. The best protection is to limit the amount of resources that an unauthorized user can cause to be expended. A strong authentication and access control model will help prevent such attacks from occurring in the first place. The login application should be protected against DoS attacks as much as possible. Limiting the database access, perhaps by caching result sets, can help minimize the resources expended. To further limit the potential for a DoS attack, consider tracking the rate of requests received from users and blocking requests that exceed a defined rate threshold.
  • Architecture and Design: Mitigation of resource exhaustion attacks requires that the target system either: recognizes the attack and denies that user further access for a given amount of time, or uniformly throttles all requests in order to make it more difficult to consume resources more quickly than they can again be freed. The first of these solutions is an issue in itself though, since it may allow attackers to prevent the use of the system by a particular valid user. If the attacker impersonates the valid user, they may be able to prevent the user from accessing the server in question. The second solution is simply difficult to effectively institute -- and even when properly done, it does not provide a full solution. It simply makes the attack require more resources on the part of the attacker.
  • Architecture and Design: Ensure that protocols have specific limits of scale placed on them.
  • Implementation: Ensure that all failures in resource allocation place the system into a safe posture.

CWE-787: Out-of-bounds Write

The product writes data past the end, or before the beginning, of the intended buffer.

How to prevent it
  • Requirements: Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, many languages that perform their own memory management, such as Java and Perl, are not subject to buffer overflows. Other languages, such as Ada and C#, typically provide overflow protection, but the protection can be disabled by the programmer. Be wary that a language's interface to native code may still be subject to overflows, even if the language itself is theoretically safe.
  • Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. Examples include the Safe C String Library (SafeStr) by Messier and Viega [REF-57], and the Strsafe.h library from Microsoft [REF-56]. These libraries provide safer versions of overflow-prone string-handling functions.
  • Operation, Build and Compilation: Use automatic buffer overflow detection mechanisms that are offered by certain compilers or compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms including canary-based detection and range/index checking. D3-SFCV (Stack Frame Canary Validation) from D3FEND [REF-1334] discusses canary-based detection in detail.
  • Implementation: Consider adhering to the following rules when allocating and managing an application's memory: Double check that the buffer is as large as specified. When using functions that accept a number of bytes to copy, such as strncpy(), be aware that if the destination buffer size is equal to the source buffer size, it may not NULL-terminate the string. Check buffer boundaries if accessing the buffer in a loop and make sure there is no danger of writing past the allocated space. If necessary, truncate all input strings to a reasonable length before passing them to the copy and concatenation functions.
  • Operation, Build and Compilation: Run or compile the software using features or extensions that randomly arrange the positions of a program's executable and libraries in memory. Because this makes the addresses unpredictable, it can prevent an attacker from reliably jumping to exploitable code. Examples include Address Space Layout Randomization (ASLR) [REF-58] [REF-60] and Position-Independent Executables (PIE) [REF-64]. Imported modules may be similarly realigned if their default memory addresses conflict with other modules, in a process known as "rebasing" (for Windows) and "prelinking" (for Linux) [REF-1332] using randomly generated addresses. ASLR for libraries cannot be used in conjunction with prelink since it would require relocating the libraries at run-time, defeating the whole purpose of prelinking. For more information on these techniques see D3-SAOR (Segment Address Offset Randomization) from D3FEND [REF-1335].
  • Operation: Use a CPU and operating system that offers Data Execution Protection (using hardware NX or XD bits) or the equivalent techniques that simulate this feature in software, such as PaX [REF-60] [REF-61]. These techniques ensure that any instruction executed is exclusively at a memory address that is part of the code segment. For more information on these techniques see D3-PSEP (Process Segment Execution Prevention) from D3FEND [REF-1336].
  • Implementation: Replace unbounded copy functions with analogous functions that support length arguments, such as strcpy with strncpy. Create these if they are not available.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-qj4x-9g63-25g6
XWiki Platform Old Core: Resource path traversal via /skin/ action endpoint in Jetty 12+
High Also affects org.xwiki.platform:xwiki-platform-oldcore
GHSA-mrqg-xmgm-rc5g
XWiki's REST APIs can list all pages/spaces, leading to unavailability
High Also affects org.xwiki.platform:xwiki-platform-oldcore
GHSA-h259-74h5-4rh9
XWiki vulnerable to remote code execution with script right through unprotected Velocity scripting API
Critical Also affects org.xwiki.platform:xwiki-platform-oldcore
GHSA-57q2-6cp4-9mq3
XWiki exposes passwords and emails stored in fields not named password/email in xml.vm
Medium Also affects org.xwiki.platform:xwiki-platform-oldcore
GHSA-r38m-cgpg-qj69
XWiki leaks password hashes and other accessible password properties
Medium Also affects org.xwiki.platform:xwiki-platform-oldcore
GHSA-p9qm-p942-q3w5
XWiki Platform vulnerable to SQL injection through XWiki#searchDocuments API
Critical Also affects org.xwiki.platform:xwiki-platform-oldcore
GHSA-jp4x-w9cj-97q7
XWiki allows remote code execution through preview of XClass changes in AWM editor
High Also affects org.xwiki.platform:xwiki-platform-oldcore
GHSA-prwh-7838-xf82
XWiki allows SQL injection in query endpoint of REST API with Oracle
Critical Also affects org.xwiki.platform:xwiki-platform-oldcore
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor