Grav <= 1.7.44 - Stored XSS (Authenticated) (CVE-2023-31506)

Introduction

Description

A remote and authenticated attacker (editor role or permissions to publish), would manage to inject malicious JavaScript code in the form fields to be executed on the users or administrators of the application when accessing the article or another area of the application.

Exploitation

In the following evidence, the payload used:

<isindex x="javascript:" onmouseover="alert('m3n0sd0n4ld')">

When saving, the application shows that there is a potential XSS, but has allowed the saving of the file:.

The following illustration, the victim’s browser is shown, in which the reload or access to the section is performed and the javascript code is executed.

Mitigation

Timeline

Acknowledgments

We would like to thank MITRE CVE for their attention and speed in the procedures with the CVE identifier.

References