CWE-434
AllowedUnrestricted Upload of File with Dangerous Type
Abstraction: Base · Status: Draft
The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.
5966 vulnerabilities reference this CWE, most recent first.
GHSA-X83R-6VRR-539W
Vulnerability from github – Published: 2022-09-14 00:00 – Updated: 2022-09-18 00:00AeroCMS v0.0.1 was discovered to contain an arbitrary file upload vulnerability via the component /admin/profile.php. This vulnerability allows attackers to execute arbitrary code via a crafted PHP file.
{
"affected": [],
"aliases": [
"CVE-2022-38305"
],
"database_specific": {
"cwe_ids": [
"CWE-434"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-09-13T23:15:00Z",
"severity": "HIGH"
},
"details": "AeroCMS v0.0.1 was discovered to contain an arbitrary file upload vulnerability via the component /admin/profile.php. This vulnerability allows attackers to execute arbitrary code via a crafted PHP file.",
"id": "GHSA-x83r-6vrr-539w",
"modified": "2022-09-18T00:00:34Z",
"published": "2022-09-14T00:00:39Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-38305"
},
{
"type": "WEB",
"url": "https://github.com/MegaTKC/AeroCMS/issues/3"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-X84R-JRQM-3HJ8
Vulnerability from github – Published: 2023-07-06 19:24 – Updated: 2025-02-13 18:51In Apache Linkis <=1.3.1, The PublicService module uploads files without restrictions on the path to the uploaded files, and file types.
We recommend users upgrade the version of Linkis to version 1.3.2.
For versions <=1.3.1, we suggest turning on the file path check switch in linkis.properties
wds.linkis.workspace.filesystem.owner.check=true
wds.linkis.workspace.filesystem.path.check=true
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.linkis:linkis"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.3.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-27602"
],
"database_specific": {
"cwe_ids": [
"CWE-434"
],
"github_reviewed": true,
"github_reviewed_at": "2023-07-06T21:58:51Z",
"nvd_published_at": "2023-04-10T08:15:00Z",
"severity": "CRITICAL"
},
"details": "In Apache Linkis \u003c=1.3.1, The PublicService module uploads\u00a0files without restrictions on the path to the uploaded\u00a0files, and file types.\n\nWe recommend users upgrade the version of Linkis to version 1.3.2.\u00a0\n\nFor versions \u003c=1.3.1, we suggest turning on the file path check switch in linkis.properties\n\n`wds.linkis.workspace.filesystem.owner.check=true`\n`wds.linkis.workspace.filesystem.path.check=true`",
"id": "GHSA-x84r-jrqm-3hj8",
"modified": "2025-02-13T18:51:58Z",
"published": "2023-07-06T19:24:13Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-27602"
},
{
"type": "PACKAGE",
"url": "https://github.com/apache/linkis"
},
{
"type": "WEB",
"url": "https://lists.apache.org/thread/wt70jfc0yfs6s5g0wg5dr5klnc48nsp1"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2023/04/10/1"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2023/04/18/4"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2023/04/19/3"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Apache Linkis Unrestricted File Upload vulnerability"
}
GHSA-X8FV-5W4J-WCRJ
Vulnerability from github – Published: 2024-01-30 03:30 – Updated: 2024-01-30 03:30A vulnerability, which was classified as critical, was found in SourceCodester Facebook News Feed Like 1.0. Affected is an unknown function of the component Post Handler. The manipulation leads to unrestricted upload. It is possible to launch the attack remotely. The identifier of this vulnerability is VDB-252300.
{
"affected": [],
"aliases": [
"CVE-2024-1027"
],
"database_specific": {
"cwe_ids": [
"CWE-434"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-01-30T03:15:07Z",
"severity": "MODERATE"
},
"details": "A vulnerability, which was classified as critical, was found in SourceCodester Facebook News Feed Like 1.0. Affected is an unknown function of the component Post Handler. The manipulation leads to unrestricted upload. It is possible to launch the attack remotely. The identifier of this vulnerability is VDB-252300.",
"id": "GHSA-x8fv-5w4j-wcrj",
"modified": "2024-01-30T03:30:30Z",
"published": "2024-01-30T03:30:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-1027"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.252300"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.252300"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-X8GM-J36P-FPPF
Vulnerability from github – Published: 2024-10-01 22:27 – Updated: 2024-12-19 20:14Summary
Stored Cross-Site Scripting (XSS) can archive via Uploading a new Background for a Custom Map.
Details
Users with "admin" role can set background for a custom map, this allow the upload of SVG file that can contain XSS payload which will trigger onload. This led to Stored Cross-Site Scripting (XSS).
PoC
-
Login using an Admin role account.
-
Go over to "$URL/maps/custom", the Manage Custom Maps.
-
Create a new map then choose to edit it.
-
Choose the "Set Background" option.
-
Choose to upload a SVG file that have this content.
<svg xmlns="http://www.w3.org/2000/svg" onload="alert(document.domain)">
<circle cx="50" cy="50" r="40" />
</svg>
-
Once uploaded, there should be a link to the SVG return in the POST request to the API "$URL/maps/custom/1/background".
-
Go over to that link on browser, should see a pop-up.
Impact
Attacker can use this to perform malicious java script code for malicious intent. This would impact other Admin role users and the Global Read role users. Normal users does not have permission to read the file, so they are not affected.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "librenms/librenms"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "24.9.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-47528"
],
"database_specific": {
"cwe_ids": [
"CWE-116",
"CWE-434",
"CWE-79"
],
"github_reviewed": true,
"github_reviewed_at": "2024-10-01T22:27:32Z",
"nvd_published_at": "2024-10-01T21:15:08Z",
"severity": "LOW"
},
"details": "### Summary\nStored Cross-Site Scripting (XSS) can archive via Uploading a new Background for a Custom Map.\n\n### Details\nUsers with \"admin\" role can set background for a custom map, this allow the upload of SVG file that can contain XSS payload which will trigger onload. This led to Stored Cross-Site Scripting (XSS).\n\n### PoC\n1. Login using an Admin role account.\n\n2. Go over to \"$URL/maps/custom\", the Manage Custom Maps.\n\n\n3. Create a new map then choose to edit it.\n4. Choose the \"Set Background\" option.\n\n\n5. Choose to upload a SVG file that have this content.\n```svg\n\u003csvg xmlns=\"http://www.w3.org/2000/svg\" onload=\"alert(document.domain)\"\u003e\n \u003ccircle cx=\"50\" cy=\"50\" r=\"40\" /\u003e\n\u003c/svg\u003e\n```\n\n6. Once uploaded, there should be a link to the SVG return in the POST request to the API \"$URL/maps/custom/1/background\".\n\n\n7. Go over to that link on browser, should see a pop-up.\n\n\n### Impact\nAttacker can use this to perform malicious java script code for malicious intent.\nThis would impact other Admin role users and the Global Read role users. Normal users does not have permission to read the file, so they are not affected.\n",
"id": "GHSA-x8gm-j36p-fppf",
"modified": "2024-12-19T20:14:29Z",
"published": "2024-10-01T22:27:32Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/librenms/librenms/security/advisories/GHSA-x8gm-j36p-fppf"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-47528"
},
{
"type": "WEB",
"url": "https://github.com/librenms/librenms/commit/d959bf1b366319eda16e3cd6dfda8a22beb203be"
},
{
"type": "PACKAGE",
"url": "https://github.com/librenms/librenms"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:P",
"type": "CVSS_V4"
}
],
"summary": "LibreNMS vulnerable to Stored Cross-site Scripting via File Upload"
}
GHSA-X8VX-242V-R66P
Vulnerability from github – Published: 2026-01-16 21:30 – Updated: 2026-01-16 21:30Omni Secure Files plugin versions prior to 0.1.14 contain an arbitrary file upload vulnerability in the bundled plupload example endpoint. The /wp-content/plugins/omni-secure-files/plupload/examples/upload.php handler allows unauthenticated uploads without enforcing safe file type restrictions, enabling an attacker to place attacker-controlled files under the plugin's uploads directory. This can lead to remote code execution if a server-executable file type is uploaded and subsequently accessed.
{
"affected": [],
"aliases": [
"CVE-2012-10064"
],
"database_specific": {
"cwe_ids": [
"CWE-434"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-01-16T20:15:48Z",
"severity": "CRITICAL"
},
"details": "Omni Secure Files plugin versions prior to 0.1.14 contain an arbitrary file upload vulnerability in the bundled plupload example endpoint. The /wp-content/plugins/omni-secure-files/plupload/examples/upload.php handler allows unauthenticated uploads without enforcing safe file type restrictions, enabling an attacker to place attacker-controlled files under the plugin\u0027s uploads directory. This can lead to remote code execution if a server-executable file type is uploaded and subsequently accessed.",
"id": "GHSA-x8vx-242v-r66p",
"modified": "2026-01-16T21:30:37Z",
"published": "2026-01-16T21:30:37Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-10064"
},
{
"type": "WEB",
"url": "https://packetstorm.news/files/id/113411"
},
{
"type": "WEB",
"url": "https://web.archive.org/web/20121025112632/http%3A//secunia.com/advisories/49441"
},
{
"type": "WEB",
"url": "https://web.archive.org/web/20191021091221/https%3A//www.securityfocus.com/bid/53872"
},
{
"type": "WEB",
"url": "https://wordpress.org/plugins/omni-secure-files"
},
{
"type": "WEB",
"url": "https://wpscan.com/vulnerability/376fd666-6471-479c-9b74-1d8088a33e89"
},
{
"type": "WEB",
"url": "https://www.acunetix.com/vulnerabilities/web/wordpress-plugin-omni-secure-files-upload-php-arbitrary-file-upload-0-1-13"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/19009"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/omni-secure-files-unauthenticated-arbitrary-file-upload"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/omni-secure-files/omni-secure-files-0113-arbitrary-file-upload"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-X95R-7F45-C9FF
Vulnerability from github – Published: 2023-09-14 18:32 – Updated: 2024-04-04 07:40A vulnerability has been identified in QMS Automotive (All versions < V12.39). The affected application allows users to upload arbitrary file types. This could allow an attacker to upload malicious files, that could potentially lead to code tampering.
{
"affected": [],
"aliases": [
"CVE-2023-40731"
],
"database_specific": {
"cwe_ids": [
"CWE-434"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-09-12T10:15:29Z",
"severity": "HIGH"
},
"details": "A vulnerability has been identified in QMS Automotive (All versions \u003c V12.39). The affected application allows users to upload arbitrary file types. This could allow an attacker to upload malicious files, that could potentially lead to code tampering.",
"id": "GHSA-x95r-7f45-c9ff",
"modified": "2024-04-04T07:40:34Z",
"published": "2023-09-14T18:32:40Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-40731"
},
{
"type": "WEB",
"url": "https://cert-portal.siemens.com/productcert/pdf/ssa-147266.pdf"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-X988-43FG-2VCQ
Vulnerability from github – Published: 2025-11-19 18:31 – Updated: 2025-12-12 18:30AudioCodes Fax Server and Auto-Attendant IVR appliances versions up to and including 2.6.23 expose an unauthenticated backup upload endpoint at AudioCodes_files/ajaxBackupUploadFile.php in the F2MAdmin web interface. The script derives a backup folder path from application configuration, creates the directory if it does not exist, and then moves an uploaded file to that location using the attacker-controlled filename, without any authentication, authorization, or file-type validation. On default Windows deployments where the backup directory resolves to the system drive, a remote attacker can upload web server or interpreter configuration files that cause a log file or other server-controlled resource to be treated as executable code. This allows subsequent HTTP requests to trigger arbitrary command execution under the web server account, which runs as NT AUTHORITY\SYSTEM.
{
"affected": [],
"aliases": [
"CVE-2025-34329"
],
"database_specific": {
"cwe_ids": [
"CWE-434"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-11-19T17:15:47Z",
"severity": "CRITICAL"
},
"details": "AudioCodes Fax Server and Auto-Attendant IVR appliances versions up to and including 2.6.23 expose an unauthenticated backup upload endpoint at AudioCodes_files/ajaxBackupUploadFile.php in the F2MAdmin web interface. The script derives a backup folder path from application configuration, creates the directory if it does not exist, and then moves an uploaded file to that location using the attacker-controlled filename, without any authentication, authorization, or file-type validation. On default Windows deployments where the backup directory resolves to the system drive, a remote attacker can upload web server or interpreter configuration files that cause a log file or other server-controlled resource to be treated as executable code. This allows subsequent HTTP requests to trigger arbitrary command execution under the web server account, which runs as NT AUTHORITY\\\\SYSTEM.",
"id": "GHSA-x988-43fg-2vcq",
"modified": "2025-12-12T18:30:28Z",
"published": "2025-11-19T18:31:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-34329"
},
{
"type": "WEB",
"url": "https://pierrekim.github.io/advisories/2025-audiocodes-fax-ivr.txt"
},
{
"type": "WEB",
"url": "https://pierrekim.github.io/blog/2025-11-20-audiocodes-fax-ivr-8-vulnerabilities.html"
},
{
"type": "WEB",
"url": "https://www.audiocodes.com/media/g1in2u2o/0548-product-notice-end-of-service-for-audiocodes-auto-attendant-ivr-solution.pdf"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/audiocodes-fax-ivr-appliance-unauthenticated-backup-upload-rce-via-ajaxbackupuploadfile"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-X9C5-JQPW-MHVJ
Vulnerability from github – Published: 2022-08-26 00:03 – Updated: 2022-08-28 00:00Claroline 13.5.7 and prior is vulnerable to Remote code execution via arbitrary file upload.
{
"affected": [],
"aliases": [
"CVE-2022-37159"
],
"database_specific": {
"cwe_ids": [
"CWE-434"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-08-25T17:15:00Z",
"severity": "CRITICAL"
},
"details": "Claroline 13.5.7 and prior is vulnerable to Remote code execution via arbitrary file upload.",
"id": "GHSA-x9c5-jqpw-mhvj",
"modified": "2022-08-28T00:00:27Z",
"published": "2022-08-26T00:03:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-37159"
},
{
"type": "WEB",
"url": "https://github.com/matthieu-hackwitharts/claroline-CVEs/blob/main/rce/rce_file_upload.md"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-X9CJ-W6H9-JCRQ
Vulnerability from github – Published: 2023-02-22 03:30 – Updated: 2025-03-11 21:30In affected versions of Octopus Deploy it is possible to upload a zipbomb file as a task which results in Denial of Service
{
"affected": [],
"aliases": [
"CVE-2022-2883"
],
"database_specific": {
"cwe_ids": [
"CWE-434"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-02-22T01:15:00Z",
"severity": "HIGH"
},
"details": "In affected versions of Octopus Deploy it is possible to upload a zipbomb file as a task which results in Denial of Service",
"id": "GHSA-x9cj-w6h9-jcrq",
"modified": "2025-03-11T21:30:27Z",
"published": "2023-02-22T03:30:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-2883"
},
{
"type": "WEB",
"url": "https://advisories.octopus.com/post/2023/sa2023-02"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-X9GW-RV8V-2FHV
Vulnerability from github – Published: 2022-12-12 21:31 – Updated: 2022-12-15 15:32An arbitrary file upload vulnerability in /queuing/admin/ajax.php?action=save_settings of Dynamic Transaction Queuing System v1.0 allows attackers to execute arbitrary code via a crafted PHP file.
{
"affected": [],
"aliases": [
"CVE-2022-45275"
],
"database_specific": {
"cwe_ids": [
"CWE-434"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-12-12T20:15:00Z",
"severity": "HIGH"
},
"details": "An arbitrary file upload vulnerability in /queuing/admin/ajax.php?action=save_settings of Dynamic Transaction Queuing System v1.0 allows attackers to execute arbitrary code via a crafted PHP file.",
"id": "GHSA-x9gw-rv8v-2fhv",
"modified": "2022-12-15T15:32:13Z",
"published": "2022-12-12T21:31:08Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-45275"
},
{
"type": "WEB",
"url": "https://github.com/ATKF/bug_report/blob/main/vendors/oretnom23/dynamic-transaction-queuing-system/RCE-1.md"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation
Generate a new, unique filename for an uploaded file instead of using the user-supplied filename, so that no external input is used at all.[REF-422] [REF-423]
Mitigation MIT-21
Strategy: Enforcement by Conversion
When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.
Mitigation
Consider storing the uploaded files outside of the web document root entirely. Then, use other mechanisms to deliver the files dynamically. [REF-423]
Mitigation MIT-5
Strategy: Input Validation
- Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
- When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
- Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
- For example, limiting filenames to alphanumeric characters can help to restrict the introduction of unintended file extensions.
Mitigation
Define a very limited set of allowable extensions and only generate filenames that end in these extensions. Consider the possibility of XSS (CWE-79) before allowing .html or .htm file types.
Mitigation
Strategy: Input Validation
Ensure that only one extension is used in the filename. Some web servers, including some versions of Apache, may process files based on inner extensions so that "filename.php.gif" is fed to the PHP interpreter.[REF-422] [REF-423]
Mitigation
When running on a web server that supports case-insensitive filenames, perform case-insensitive evaluations of the extensions that are provided.
Mitigation MIT-15
For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
Mitigation
Do not rely exclusively on sanity checks of file contents to ensure that the file is of the expected type and size. It may be possible for an attacker to hide code in some file segments that will still be executed by the server. For example, GIF images may contain a free-form comments field.
Mitigation
Do not rely exclusively on the MIME content type or filename attribute when determining how to render a file. Validating the MIME content type and ensuring that it matches the extension is only a partial solution.
Mitigation MIT-17
Strategy: Environment Hardening
Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
Mitigation MIT-22
Strategy: Sandbox or Jail
- Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software.
- OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations.
- This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise.
- Be careful to avoid CWE-243 and other weaknesses related to jails.
CAPEC-1: Accessing Functionality Not Properly Constrained by ACLs
In applications, particularly web applications, access to functionality is mitigated by an authorization framework. This framework maps Access Control Lists (ACLs) to elements of the application's functionality; particularly URL's for web apps. In the case that the administrator failed to specify an ACL for a particular element, an attacker may be able to access it with impunity. An attacker with the ability to access functionality not properly constrained by ACLs can obtain sensitive information and possibly compromise the entire application. Such an attacker can access resources that must be available only to users at a higher privilege level, can access management sections of the application, or can run queries for data that they otherwise not supposed to.