CVE-2025-51510: MoonShine SQL Injection Vulnerability in Blog Module

moonshine/moonshine Updated 02 Oct 2025

Summary

19/08/2025
No i
Moderate
4.9

CVE-2025-51510: MoonShine SQL Injection Vulnerability. Affects moonshine/moonshine versions < 3.12.5. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

MoonShine is a popular PHP framework designed for building web applications with a focus on simplicity and flexibility. It provides a range of features including a robust blogging module, which allows users to create and manage blog content easily. However, the framework has been found to be vulnerable to SQL injection attacks, particularly in the Blog module, which can lead to unauthorized access to sensitive data.

Vulnerability Detail

The vulnerability identified as CVE-2025-51510 is a SQL injection flaw present in MoonShine version 3.12.5. This issue arises from improper handling of user input in the Data parameter of the Blog module, allowing attackers to manipulate SQL queries. If exploited, this vulnerability could enable attackers to execute arbitrary SQL commands, potentially leading to data leakage or corruption. The severity of this vulnerability is classified as moderate, with a CVSS score of 4.9.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, developers can sanitize and validate the input received in the Data parameter to prevent SQL injection. Implementing prepared statements or using ORM (Object-Relational Mapping) can also help mitigate the risk. For example, using PDO in PHP:

$stmt = $pdo->prepare('SELECT * FROM blog WHERE id = :id');
$stmt->execute(['id' => $inputId]);

Conclusion

The SQL injection vulnerability in MoonShine version 3.12.5 poses a significant risk to applications utilizing the framework's Blog module. It is crucial for developers to update to the latest version to mitigate this risk and ensure the security of their applications.

See every vulnerability recorded for moonshine/moonshine →

Share this vulnerability

FAQ

CVE-2025-51510 is a SQL injection vulnerability found in the MoonShine framework, specifically in the Blog module.

You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in real-time. Visit Vulert Scanner to analyze your composer.lock file.

Exploitation of this vulnerability can lead to unauthorized access to sensitive data, data corruption, or even complete database compromise.

Yes, updating to the latest version of MoonShine will patch the vulnerability. Use the command composer update moonshine/moonshine.

The CVSS score for this vulnerability is 4.9, indicating a moderate level of severity.

Related vulnerabilities

Recent vulnerabilities recorded for moonshine/moonshine.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback