{"id":25423,"date":"2025-11-10T11:37:11","date_gmt":"2025-11-10T11:37:11","guid":{"rendered":"http:\/\/localhost\/?p=25423"},"modified":"2025-11-10T11:37:11","modified_gmt":"2025-11-10T11:37:11","slug":"curl-arbitrary-configuration-file-inclusion-via-external-control-of-file-name-or-path","status":"publish","type":"post","link":"https:\/\/zero.redgem.net\/?p=25423","title":{"rendered":"curl: Arbitrary Configuration File Inclusion: via External Control of File Name or Path_H1:3418646"},"content":{"rendered":"<p>{&#8220;lastseen&#8221;:&#8221;2025-11-10T16:40:11&#8243;,&#8221;description&#8221;:&#8221;## Summary:\\nThe Arbitrary Configuration File Inclusion (ACFI) vulnerability was identified in the curl utility via the &#8211;config \\u003cfile\\u003e option. This flaw is a form of External Control of File Name or Path (CWE-73), occurring due to the lack of adequate validation on the user-supplied configuration file path.\\n\\nAn attacker can leverage this weakness to:\\nTrick a user into executing curl with a malicious configuration file located at an arbitrary path (e.g., \/tmp\/malicious.curlrc).\\n\\nSignificantly control curl&#8217;s behavior, including setting dangerous options such as url = \\&#8221;file:\/\/\/\\&#8221; and output = \\&#8221;&#8230;\\&#8221;.\\n\\nThe impact is Critical, potentially allowing the attacker to perform a Local File Read of sensitive files like \/etc\/passwd and an Arbitrary File Write to arbitrary locations on the victim&#8217;s system.\\n\\n\\&#8221;I confirm that I performed the vulnerability discovery and core technical analysis manually. However, AI tools (such as Gemini\/ChatGPT) were utilized solely for summarizing the findings, calculating the CVSS score, and drafting the formal report structure based on my raw technical data. AI was not used to generate the exploit code or perform the scan\/discovery.\\&#8221;\\n\\n## Affected version\\ncurl\/libcurl version :  8.15.0\\nplatform : x86_64-pc-linux-gnu\\n\\n## Steps To Reproduce:\\n[add details for how we can reproduce the issue]\\n\\n  1.  create a malicious configuration file :\\nOpen the terminal and run the following command to create a file named \/tmp\/malicious.curlrc. This file will instruct curl to read the \/etc\/passwd file and save it to \/tmp\/stolen_passwd.txt.\\n\\necho &#8216;url = \\&#8221;file:\/\/\/etc\/passwd\\&#8221;&#8216; \\u003e \/tmp\/malicious.curlrc\\necho &#8216;output = \\&#8221;\/tmp\/stolen_passwd.txt\\&#8221;&#8216; \\u003e\\u003e \/tmp\/malicious.curlrc\\n\\n  2. and then Run curl and direct it to use the configuration file you just created using the &#8211;config\\n\\ncurl &#8211;config \/tmp\/malicious.curlrc\\n\\n  3. Then we check whether the file \/tmp\/stolen_passwd.txt has been successfully created and contains the contents of \/etc\/passwd.\\n\\ncat \/tmp\/stolen_passwd.txt\\n\\nThe results are in.\\n\\ncurl executes instructions from configuration files without warning, reads sensitive local files (\/etc\/passwd), and writes them to a location specified by the attacker (\/tmp\/stolen_passwd.txt).\\n\\nThis proves that attackers can read arbitrary local files and write to locations accessible to users running curl\\n\\n## Supporting Material\/References:\\nThis vulnerability stems from the way curl parses configuration files without adequate path validation.\\n\\nsource file: \/curl\/src\/\\n\\nThe curlx_fopen function is called with a filename that is directly controlled by the user via the &#8211;config argument.\\nvulnerable lines of code : \\nfile = curlx_fopen(filename, FOPEN_READTEXT);\\n\\nExecution point (sink): Each line of the configuration file is then processed by the `getparameter` function, which executes malicious instructions such as `url` and `output`.\\ncode :\\nres = getparameter(option, param, \\u0026usedarg, config, max_recursive);\\n\\n  * [attachment \/ reference]\\n CWE-73: External Control of File Name or Path\\n\\n## Impact\\n\\n## Summary: The impact of this vulnerability is Critical, as it gives attackers the ability to perform several dangerous actions on the target system, depending on the access rights of the user running curl.\\n\\n 1. Sensitive Information Disclosure:\\nAn attacker can read any file accessible to the user. This\\nincludes, but is not limited to:\\n* User Credentials: Private SSH keys (~\/.ssh\/id_rsa), shell\\nhistory files (~\/.bash_history), API tokens, or cloud credentials stored in ~\/.aws\/credentials.\\n* Application Secrets: Configuration files containing database passwords, API keys, or other sensitive data.\\n* System Data: Files such as \/etc\/passwd or system logs that can be used for user enumeration and system mapping.\\n\\n 2. File Modification and Potential Code Execution (Arbitrary File Write \\u0026 Code Execution):\\n  By using output parameters in configuration files, attackers can write or overwrite files in permitted locations. Attack scenarios\\n  include:\\n* Achieving Persistent Code Execution: Overwriting startup shell files such as ~\/.bashrc or ~\/.profile to insert malicious commands that will be executed every time a user logs in.\\n* Planting a Web Shell: If curl is run by the web server, attackers can write PHP files or other scripts to the web directory\\n(\/var\/www\/html\/shell.php), which gives them remote shell access.\\n* Compromising System Integrity: Overwriting important files that can cause Denial of Service (DoS).\\n\\n3. SSRF (Server-Side Request Forgery) Attack:\\n  An attacker can force the server to make network requests to internal resources that are not accessible from the outside. By setting url = \u201chttp:\/\/169.254.169.254\/latest\/meta-data\/\u201d (in an AWS environment) or url = \u201chttp:\/\/localhost:8080\/admin\u201d, attackers can scan the internal network and steal data from internal services.\\n\\nOverall, this vulnerability compromises the three pillars of security: Confidentiality, Integrity, and potentially Availability of the system.&#8221;,&#8221;published&#8221;:&#8221;2025-11-10T15:55:21&#8243;,&#8221;modified&#8221;:&#8221;2025-11-10T16:21:14&#8243;,&#8221;type&#8221;:&#8221;hackerone&#8221;,&#8221;title&#8221;:&#8221;curl: Arbitrary Configuration File Inclusion: via External Control of File Name or Path&#8221;,&#8221;source&#8221;:&#8221;&#8221;,&#8221;references&#8221;:&#8221;&#8221;,&#8221;id&#8221;:&#8221;H1:3418646&#8243;,&#8221;bulletinFamily&#8221;:&#8221;bugbounty&#8221;,&#8221;cwe&#8221;:null,&#8221;cvelist&#8221;:[],&#8221;sourceData&#8221;:&#8221;&#8221;,&#8221;sourceHref&#8221;:&#8221;&#8221;,&#8221;cvss&#8221;:{&#8220;score&#8221;:0,&#8221;severity&#8221;:&#8221;NONE&#8221;,&#8221;vector&#8221;:&#8221;NONE&#8221;,&#8221;version&#8221;:&#8221;NONE&#8221;},&#8221;cvss2&#8243;:{},&#8221;cvss3&#8243;:{&#8220;version&#8221;:&#8221;&#8221;,&#8221;vectorString&#8221;:&#8221;&#8221;,&#8221;baseScore&#8221;:0,&#8221;baseSeverity&#8221;:&#8221;&#8221;,&#8221;attackVector&#8221;:&#8221;&#8221;,&#8221;attackComplexity&#8221;:&#8221;&#8221;,&#8221;privilegesRequired&#8221;:&#8221;&#8221;,&#8221;userInteraction&#8221;:&#8221;&#8221;,&#8221;scope&#8221;:&#8221;&#8221;,&#8221;confidentialityImpact&#8221;:&#8221;&#8221;,&#8221;integrityImpact&#8221;:&#8221;&#8221;,&#8221;availabilityImpact&#8221;:&#8221;&#8221;,&#8221;cvssV3&#8243;:{&#8220;version&#8221;:&#8221;&#8221;,&#8221;vectorString&#8221;:&#8221;&#8221;,&#8221;baseScore&#8221;:0,&#8221;baseSeverity&#8221;:&#8221;&#8221;,&#8221;attackVector&#8221;:&#8221;&#8221;,&#8221;attackComplexity&#8221;:&#8221;&#8221;,&#8221;privilegesRequired&#8221;:&#8221;&#8221;,&#8221;userInteraction&#8221;:&#8221;&#8221;,&#8221;scope&#8221;:&#8221;&#8221;,&#8221;confidentialityImpact&#8221;:&#8221;&#8221;,&#8221;integrityImpact&#8221;:&#8221;&#8221;,&#8221;availabilityImpact&#8221;:&#8221;&#8221;}},&#8221;href&#8221;:&#8221;https:\/\/hackerone.com\/reports\/3418646&#8243;,&#8221;category_name&#8221;:&#8221;News&#8221;,&#8221;post_link&#8221;:&#8221;&#8221;,&#8221;product&#8221;:&#8221;&#8221;,&#8221;version&#8221;:&#8221;&#8221;,&#8221;vendor&#8221;:&#8221;&#8221;,&#8221;ai_description&#8221;:&#8221;&#8221;,&#8221;ai_severity&#8221;:&#8221;&#8221;,&#8221;ai_vendor&#8221;:&#8221;&#8221;,&#8221;ai_product&#8221;:&#8221;&#8221;,&#8221;ai_version&#8221;:&#8221;&#8221;,&#8221;ai_score&#8221;:0}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>{&#8220;lastseen&#8221;:&#8221;2025-11-10T16:40:11&#8243;,&#8221;description&#8221;:&#8221;## Summary:\\nThe Arbitrary Configuration File Inclusion (ACFI) vulnerability was identified in the curl utility via the &#8211;config \\u003cfile\\u003e option. This flaw is a form of&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[6,8,12,117,13,33,7,11,5],"class_list":["post-25423","post","type-post","status-publish","format-standard","hentry","category-category_news","tag-cve","tag-cvss","tag-exploit","tag-hackerone","tag-news","tag-none","tag-security","tag-tapic","tag-vulnerability"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>curl: Arbitrary Configuration File Inclusion: via External Control of File Name or Path_H1:3418646 - zero redgem<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/zero.redgem.net\/?p=25423\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"curl: Arbitrary Configuration File Inclusion: via External Control of File Name or Path_H1:3418646 - zero redgem\" \/>\n<meta property=\"og:description\" content=\"{&#8220;lastseen&#8221;:&#8221;2025-11-10T16:40:11&#8243;,&#8221;description&#8221;:&#8221;## Summary:nThe Arbitrary Configuration File Inclusion (ACFI) vulnerability was identified in the curl utility via the &#8211;config u003cfileu003e option. This flaw is a form of...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/zero.redgem.net\/?p=25423\" \/>\n<meta property=\"og:site_name\" content=\"zero redgem\" \/>\n<meta property=\"article:published_time\" content=\"2025-11-10T11:37:11+00:00\" \/>\n<meta name=\"author\" content=\"invoker\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"invoker\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=25423#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=25423\"},\"author\":{\"name\":\"invoker\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/person\\\/fbfeae8dfad117ac08a7621bee1a1dca\"},\"headline\":\"curl: Arbitrary Configuration File Inclusion: via External Control of File Name or Path_H1:3418646\",\"datePublished\":\"2025-11-10T11:37:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=25423\"},\"wordCount\":910,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\"},\"keywords\":[\"CVE\",\"CVSS\",\"exploit\",\"hackerone\",\"news\",\"NONE\",\"Security\",\"tapic\",\"Vulnerability\"],\"articleSection\":[\"category_news\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/zero.redgem.net\\\/?p=25423#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=25423\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/?p=25423\",\"name\":\"curl: Arbitrary Configuration File Inclusion: via External Control of File Name or Path_H1:3418646 - zero redgem\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#website\"},\"datePublished\":\"2025-11-10T11:37:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=25423#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/zero.redgem.net\\\/?p=25423\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/?p=25423#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/zero.redgem.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"curl: Arbitrary Configuration File Inclusion: via External Control of File Name or Path_H1:3418646\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#website\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/\",\"name\":\"zero redgem\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/zero.redgem.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#organization\",\"name\":\"zero redgem\",\"url\":\"https:\\\/\\\/zero.redgem.net\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"\",\"contentUrl\":\"\",\"width\":191,\"height\":188,\"caption\":\"zero redgem\"},\"image\":{\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/zero.redgem.net\\\/#\\\/schema\\\/person\\\/fbfeae8dfad117ac08a7621bee1a1dca\",\"name\":\"invoker\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g\",\"caption\":\"invoker\"},\"sameAs\":[\"https:\\\/\\\/zero.redgem.net\"],\"url\":\"https:\\\/\\\/zero.redgem.net\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"curl: Arbitrary Configuration File Inclusion: via External Control of File Name or Path_H1:3418646 - zero redgem","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zero.redgem.net\/?p=25423","og_locale":"en_US","og_type":"article","og_title":"curl: Arbitrary Configuration File Inclusion: via External Control of File Name or Path_H1:3418646 - zero redgem","og_description":"{&#8220;lastseen&#8221;:&#8221;2025-11-10T16:40:11&#8243;,&#8221;description&#8221;:&#8221;## Summary:nThe Arbitrary Configuration File Inclusion (ACFI) vulnerability was identified in the curl utility via the &#8211;config u003cfileu003e option. This flaw is a form of...","og_url":"https:\/\/zero.redgem.net\/?p=25423","og_site_name":"zero redgem","article_published_time":"2025-11-10T11:37:11+00:00","author":"invoker","twitter_card":"summary_large_image","twitter_misc":{"Written by":"invoker","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/zero.redgem.net\/?p=25423#article","isPartOf":{"@id":"https:\/\/zero.redgem.net\/?p=25423"},"author":{"name":"invoker","@id":"https:\/\/zero.redgem.net\/#\/schema\/person\/fbfeae8dfad117ac08a7621bee1a1dca"},"headline":"curl: Arbitrary Configuration File Inclusion: via External Control of File Name or Path_H1:3418646","datePublished":"2025-11-10T11:37:11+00:00","mainEntityOfPage":{"@id":"https:\/\/zero.redgem.net\/?p=25423"},"wordCount":910,"commentCount":0,"publisher":{"@id":"https:\/\/zero.redgem.net\/#organization"},"keywords":["CVE","CVSS","exploit","hackerone","news","NONE","Security","tapic","Vulnerability"],"articleSection":["category_news"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/zero.redgem.net\/?p=25423#respond"]}]},{"@type":"WebPage","@id":"https:\/\/zero.redgem.net\/?p=25423","url":"https:\/\/zero.redgem.net\/?p=25423","name":"curl: Arbitrary Configuration File Inclusion: via External Control of File Name or Path_H1:3418646 - zero redgem","isPartOf":{"@id":"https:\/\/zero.redgem.net\/#website"},"datePublished":"2025-11-10T11:37:11+00:00","breadcrumb":{"@id":"https:\/\/zero.redgem.net\/?p=25423#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zero.redgem.net\/?p=25423"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/zero.redgem.net\/?p=25423#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zero.redgem.net\/"},{"@type":"ListItem","position":2,"name":"curl: Arbitrary Configuration File Inclusion: via External Control of File Name or Path_H1:3418646"}]},{"@type":"WebSite","@id":"https:\/\/zero.redgem.net\/#website","url":"https:\/\/zero.redgem.net\/","name":"zero redgem","description":"","publisher":{"@id":"https:\/\/zero.redgem.net\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zero.redgem.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/zero.redgem.net\/#organization","name":"zero redgem","url":"https:\/\/zero.redgem.net\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zero.redgem.net\/#\/schema\/logo\/image\/","url":"","contentUrl":"","width":191,"height":188,"caption":"zero redgem"},"image":{"@id":"https:\/\/zero.redgem.net\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/zero.redgem.net\/#\/schema\/person\/fbfeae8dfad117ac08a7621bee1a1dca","name":"invoker","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f17c01d7338e6932bcde121cf83569393df3374625d25afd62677cfb528f2e3e?s=96&d=mm&r=g","caption":"invoker"},"sameAs":["https:\/\/zero.redgem.net"],"url":"https:\/\/zero.redgem.net\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts\/25423","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=25423"}],"version-history":[{"count":0,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=\/wp\/v2\/posts\/25423\/revisions"}],"wp:attachment":[{"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=25423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=25423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zero.redgem.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=25423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}