Process-memory corruption via unbounded LANG formatting
Published Oct 31, 2022 · Updated May 7, 2025
Buffer overflow in xfig 3.2.7 allows local users to corrupt process memory by launching it with an excessively long LANG value. In src/w_help.c, the help-viewer path builder passes the unbounded LANG environment string to sprintf() for a fixed-size filename buffer. The user must control the process environment and start xfig; upstream reports no automatic invocation or cross-user exposure.
Summary
What happened
Buffer overflow in xfig 3.2.7 allows local users to corrupt process memory by launching it with an excessively long LANG value. In src/w_help.c, the help-viewer path builder passes the unbounded LANG environment string to sprintf() for a fixed-size filename buffer. The user must control the process environment and start xfig; upstream reports no automatic invocation or cross-user exposure.
The record
- CVE
- CVE-2021-40241
- Published
- Oct 31, 2022
- Updated
- May 7, 2025
- Vendor
- Unknown vendor
- Product
- Unknown product
- Classifications
- CWE-120
- Attack vector
- local
- Privileges
- Unavailable
Timeline
How it unfolded
- Oct 31, 2022CVE publishedPublication date reported by the CVE source.
- May 7, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
What conditions does exploitation require?
What is affected?
Affected products and versions are unavailable in this record.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
- LANG environment-variable overflow triggerproof of concept · validated
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo