CWE-616
Incomplete Identification of Uploaded File Variables (PHP)
The PHP application uses an old method for processing uploaded files by referencing the four global variables that are set for each file (e.g. $varname, $varname_size, $varname_name, $varname_type). These variables could be overwritten by attackers, causing the application to process unauthorized files.
CVE-2024-52305 (GCVE-0-2024-52305)
Vulnerability from cvelistv5
Published
2024-11-13 15:20
Modified
2024-11-13 19:25
Severity ?
VLAI Severity ?
EPSS score ?
CWE
Summary
UnoPim is an open-source Product Information Management (PIM) system built on the Laravel framework. A vulnerability exists in the Create User process, allowing the creation of a new admin account with an option to upload a profile image. An attacker can upload a malicious SVG file containing an embedded script. When the profile image is accessed, the embedded script executes, leading to the potential theft of session cookies. This vulnerability is fixed in 0.1.5.
References
► | URL | Tags | ||||||
---|---|---|---|---|---|---|---|---|
|
{ "containers": { "adp": [ { "affected": [ { "cpes": [ "cpe:2.3:a:unopim:unopim:*:*:*:*:*:*:*:*" ], "defaultStatus": "unknown", "product": "unopim", "vendor": "unopim", "versions": [ { "lessThan": "0.1.5", "status": "affected", "version": "0", "versionType": "custom" } ] } ], "metrics": [ { "other": { "content": { "id": "CVE-2024-52305", "options": [ { "Exploitation": "poc" }, { "Automatable": "yes" }, { "Technical Impact": "partial" } ], "role": "CISA Coordinator", "timestamp": "2024-11-13T19:23:52.354530Z", "version": "2.0.3" }, "type": "ssvc" } } ], "providerMetadata": { "dateUpdated": "2024-11-13T19:25:30.116Z", "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP" }, "title": "CISA ADP Vulnrichment" } ], "cna": { "affected": [ { "product": "unopim", "vendor": "unopim", "versions": [ { "status": "affected", "version": "\u003c 0.1.5" } ] } ], "descriptions": [ { "lang": "en", "value": "UnoPim is an open-source Product Information Management (PIM) system built on the Laravel framework. A vulnerability exists in the Create User process, allowing the creation of a new admin account with an option to upload a profile image. An attacker can upload a malicious SVG file containing an embedded script. When the profile image is accessed, the embedded script executes, leading to the potential theft of session cookies. This vulnerability is fixed in 0.1.5." } ], "metrics": [ { "cvssV3_1": { "attackComplexity": "LOW", "attackVector": "NETWORK", "availabilityImpact": "NONE", "baseScore": 6.5, "baseSeverity": "MEDIUM", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "privilegesRequired": "NONE", "scope": "UNCHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N", "version": "3.1" } } ], "problemTypes": [ { "descriptions": [ { "cweId": "CWE-616", "description": "CWE-616: Incomplete Identification of Uploaded File Variables (PHP)", "lang": "en", "type": "CWE" } ] }, { "descriptions": [ { "cweId": "CWE-692", "description": "CWE-692: Incomplete Denylist to Cross-Site Scripting", "lang": "en", "type": "CWE" } ] } ], "providerMetadata": { "dateUpdated": "2024-11-13T18:38:42.229Z", "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "shortName": "GitHub_M" }, "references": [ { "name": "https://github.com/unopim/unopim/security/advisories/GHSA-cgr4-c233-h733", "tags": [ "x_refsource_CONFIRM" ], "url": "https://github.com/unopim/unopim/security/advisories/GHSA-cgr4-c233-h733" }, { "name": "https://github.com/unopim/unopim/commit/9a0da7a0892c60f58df2351b5a9498dcb4cb8b7a", "tags": [ "x_refsource_MISC" ], "url": "https://github.com/unopim/unopim/commit/9a0da7a0892c60f58df2351b5a9498dcb4cb8b7a" } ], "source": { "advisory": "GHSA-cgr4-c233-h733", "discovery": "UNKNOWN" }, "title": "UnoPim Stored XSS : Cookie hijacking through Create User function" } }, "cveMetadata": { "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "assignerShortName": "GitHub_M", "cveId": "CVE-2024-52305", "datePublished": "2024-11-13T15:20:20.679Z", "dateReserved": "2024-11-06T19:00:26.397Z", "dateUpdated": "2024-11-13T19:25:30.116Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1" }
Mitigation
Phase: Architecture and Design
Description:
- Use PHP 4 or later.
Mitigation
Phase: Architecture and Design
Description:
- If you must support older PHP versions, write your own version of is_uploaded_file() and run it against $HTTP_POST_FILES['userfile']))
Mitigation
Phase: Implementation
Description:
- For later PHP versions, reference uploaded files using the $HTTP_POST_FILES or $_FILES variables, and use is_uploaded_file() or move_uploaded_file() to ensure that you are dealing with an uploaded file.
No CAPEC attack patterns related to this CWE.