Directory Traversal Vulnerability in GeSHi Package: CVE-2012-3521

geshi Updated 02 Oct 2025

Summary

13/06/2014
N/A
Yes i
Unrated
Not published

CVE-2012-3521: Multiple directory traversal vulnerabilities in the cssgen contrib module in GeSHi before 1.0.8.11 allow remote attackers to read arbitrary files via a .. Affects geshi versions < 1.0.8.4-2. 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 Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

GeSHi (Generic Syntax Highlighter) is a popular open-source library used for syntax highlighting in various programming languages. It is widely utilized in web applications to enhance code readability by applying color coding to different syntax elements. However, certain versions of the cssgen contrib module in GeSHi are vulnerable to directory traversal attacks, which can lead to unauthorized access to sensitive files on the server.

Vulnerability Detail

The vulnerability identified as CVE-2012-3521 arises from multiple directory traversal flaws in the cssgen contrib module of GeSHi prior to version 1.0.8.11. Attackers can exploit this vulnerability by manipulating the geshi-path or geshi-lang-path parameters to include '..' (dot dot) sequences, allowing them to traverse the directory structure and access arbitrary files on the server. This can lead to exposure of sensitive information, including configuration files and user data, potentially compromising the security of the application.

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 upgrading is not immediately feasible, a temporary workaround is to validate and sanitize the input for the geshi-path and geshi-lang-path parameters to prevent the inclusion of '..' sequences. This can be done by implementing checks in the application code to ensure that these parameters do not contain any directory traversal patterns.

Conclusion

CVE-2012-3521 represents a significant security risk for applications using vulnerable versions of the GeSHi package. It is crucial to upgrade to a fixed version to mitigate this risk. Additionally, implementing input validation can serve as a temporary workaround until an upgrade can be performed.

See every vulnerability recorded for geshi →

Share this vulnerability

FAQ

CVE-2012-3521 is a vulnerability in the GeSHi package that allows remote attackers to exploit directory traversal flaws to read arbitrary files on the server.

Versions of GeSHi prior to 1.0.8.11 are affected by this vulnerability.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Exploitation of this vulnerability can lead to unauthorized access to sensitive files, which may compromise the security of the application and expose confidential information.

Yes, you can implement input validation and sanitization for the geshi-path and geshi-lang-path parameters to prevent directory traversal attacks as a temporary measure.

Related vulnerabilities

Recent vulnerabilities recorded for geshi.

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