CVE-2025-5297 Details
Description
A vulnerability, which was classified as critical, has been found in SourceCodester Computer Store System 1.0. This issue affects the function Add of the file main.c. The manipulation of the argument laptopcompany/RAM/Processor leads to stack-based buffer overflow. An attack has to be approached locally. The exploit has been disclosed to the public and may be used.
A critical stack-based buffer overflow vulnerability has been identified in SourceCodester Computer Store System version 1.0. The issue arises in the 'Add' function of 'main.c', where the unsafe 'gets()' function is used to read input into a fixed-size buffer 'RAM'. This lack of bounds checking allows for the overflow of the buffer, potentially overwriting adjacent memory and control data on the stack, such as the return address. This vulnerability can be exploited locally, leading to arbitrary code execution or program crashes.
Replace the 'gets()' function with safer alternatives that include bounds checking, such as 'fgets()' or 'scanf()' with length limits. Additionally, audit the codebase to remove all instances of 'gets()' and ensure that no unchecked input is directed to fixed-size buffers.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed May 28, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/byxs0x0/cve/issues/6 | [email protected] | ExploitIssue TrackingThird Party Advisory |
| https://vuldb.com/?ctiid.310421 | [email protected] | Permissions RequiredVDB Entry |
| https://vuldb.com/?id.310421 | [email protected] | Third Party AdvisoryVDB Entry |
| https://vuldb.com/?submit.585114 | [email protected] | Third Party AdvisoryVDB Entry |
| https://www.sourcecodester.com/ | [email protected] | Product |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-787 | Out-of-bounds Write | [email protected] |
| CWE-119 | Improper Restriction of Operations within the Bounds of a Memory Buffer | [email protected] |
| CWE-121 | Stack-based Buffer Overflow | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| razormist simple computer store system | 1.0 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 10, 2025 | Initial Analysis | [email protected] |
| May 28, 2025 | New CVE Received | [email protected] |