Cross-Site Scripting Vulnerability in GeSHi Package

geshi Updated 02 Oct 2025

Summary

09/03/2025
N/A
Yes i
Medium
6.1

CVE-2025-2123: A vulnerability, which was classified as problematic, has been found in GeSHi up to 1.0.9.1. Affects geshi across 2 version ranges.

< 1.0.8.4-2 < fd22ab78481bf90337862b590e6f7517863926b8

Fixed in 1.0.8.4-2. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

GeSHi (Generic Syntax Highlighter) is a popular library used for syntax highlighting in various programming languages. It is widely utilized in web applications to enhance code readability and presentation. The library supports a multitude of languages and provides customizable options for styling. However, versions up to 1.0.9.1 have been found to contain a critical vulnerability that exposes applications to cross-site scripting (XSS) attacks, potentially compromising user data and application integrity.

Vulnerability Detail

A vulnerability classified as problematic has been identified in GeSHi versions up to 1.0.9.1. The issue arises from the function get_var in the file /contrib/cssgen.php within the CSS Handler component. Specifically, the manipulation of the argument default-styles/keywords-1/keywords-2/keywords-3/keywords-4/comments can lead to cross-site scripting (XSS). This vulnerability allows attackers to execute arbitrary scripts in the context of the user’s browser, which can result in data theft, session hijacking, or other malicious activities. The attack can be launched remotely, making it particularly dangerous. The exploit has been publicly disclosed and is actively being used.

How To Fix

Minimum fixed version

1.0.8.4-2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade geshi

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If an immediate update is not feasible, consider implementing input validation and sanitization on the affected parameters to prevent XSS attacks. This can be done by encoding user inputs and ensuring that any dynamic content is properly escaped before rendering in the browser.

Conclusion

The identified cross-site scripting vulnerability in the GeSHi package poses significant risks to web applications utilizing this library. It is crucial for developers and system administrators to update to a patched version promptly and consider implementing additional security measures to protect against potential exploits.

See every vulnerability recorded for geshi →

Share this vulnerability

FAQ

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

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application using the Vulert playground without any signup.

The consequences include unauthorized script execution, data theft, session hijacking, and potential damage to user trust and application integrity.

Yes, ensure that you are using a version of GeSHi that is higher than 1.0.9.1 to avoid this vulnerability.

Implement input validation and sanitization on the affected parameters as a temporary measure to mitigate the risk of XSS attacks.

Related vulnerabilities

Recent vulnerabilities recorded for geshi.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

1.0.8.4-2

This is the first release that contains the fix.

sudo apt-get install --only-upgrade geshi

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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