# CVE-2025-58365: XWiki Blog Application: Privilege Escalation (PR) from account through blog content

> Attackers with edit rights can execute arbitrary code via blog post content, leading to privilege escalation and remote code execution.

- **Severity:** High 8.7 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 Sep 2025
- **Updated:** 9 Sep 2025
- **Also known as:** GHSA-gwj6-xpfg-pxwr

## What is CVE-2025-58365?

CVE-2025-58365 is a high-severity code injection vulnerability in xwiki-contrib application-blog, published on 8 Sep 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

The XWiki blog application allows users of the XWiki platform to create and manage blog posts. Prior to version 9.14, the blog application in XWiki allowed remote code execution for any user who has edit right on any page. Normally, these are all logged-in users as they can edit their own user profile. For an exploit, it is sufficient to add an object of type `Blog.BlogPostClass` to any page and to add some script macro with the exploit code to the "Content" field of that object. The vulnerability has been patched in the blog application version 9.14 by executing the content of blog posts with the rights of the appropriate author. No known workarounds are available.

Weakness: CWE-95 (Improper Neutralization of Directives in Dynamically Evaluated Code)

## Which versions are affected by CVE-2025-58365?

2 open source packages ship an affected version, including org.xwiki.contrib.blog:application-blog-ui.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.xwiki.contrib.blog:application-blog-ui` | Maven | All versions | 9.14 |
| `org.xwiki.contrib.blog:application-blog-ui` | Maven | All versions | 9.14 |

## How do I fix CVE-2025-58365?

Upgrade org.xwiki.contrib.blog:application-blog-ui to 9.14 or later.

## Is CVE-2025-58365 being exploited?

There is no known exploitation of CVE-2025-58365 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-58365 and fix it if it is affected.

What it is: CVE-2025-58365 is a high-severity code injection vulnerability in xwiki-contrib application-blog, published on 8 Sep 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-58365 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.xwiki.contrib.blog:application-blog-ui (Maven): affected all versions; fixed in 9.14
- org.xwiki.contrib.blog:application-blog-ui (Maven): affected all versions; fixed in 9.14

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-58365/ (Markdown: https://insights.sbomify.com/CVE-2025-58365/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-58365
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-58365
- OSV: https://osv.dev/vulnerability/CVE-2025-58365

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-58365/
Summaries are generated and may contain mistakes; the official description above is the record.
