{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2023-26031","assignerOrgId":"f0158376-9dc2-43b6-827c-5f631a4d8d09","state":"PUBLISHED","assignerShortName":"apache","dateReserved":"2023-02-17T19:39:48.891Z","datePublished":"2023-11-16T08:15:50.808Z","dateUpdated":"2025-02-13T16:44:42.474Z"},"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Apache Hadoop","vendor":"Apache Software Foundation","versions":[{"lessThan":"3.3.5","status":"affected","version":"3.3.1","versionType":"semver"}]}],"configurations":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"The owner of the&nbsp;container-executor binary must be set to \"root\" and suid set bit such that callers would execute the binary as root. These operations are a requirement for \"YARN Secure Containers\".<br> <br>In an installation using the hadoop.tar.gz file the binary's owner is that of the installing user, and without the suid permission is not at risk. <br><br>However, Apache BIgtop installations set the owner and permissions such that installations may be vulnerable<br><br>The container-executor&nbsp;binary is only vulnerable on some Hadoop/Bigtop releases. It is possible to verify whether a version is vulnerable using the readelf command."}],"value":"The owner of the container-executor binary must be set to \"root\" and suid set bit such that callers would execute the binary as root. These operations are a requirement for \"YARN Secure Containers\".\n \nIn an installation using the hadoop.tar.gz file the binary's owner is that of the installing user, and without the suid permission is not at risk. \n\nHowever, Apache BIgtop installations set the owner and permissions such that installations may be vulnerable\n\nThe container-executor binary is only vulnerable on some Hadoop/Bigtop releases. It is possible to verify whether a version is vulnerable using the readelf command."}],"credits":[{"lang":"en","type":"finder","value":"Esa Hiltunen"},{"lang":"en","type":"finder","value":"Mikko Kortelainen"},{"lang":"en","type":"sponsor","value":"The Teragrep Project"}],"descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<br>Relative library resolution in linux container-executor binary in Apache Hadoop 3.3.1-3.3.4 on Linux allows local user to gain root privileges. If the YARN cluster is accepting work from remote (authenticated) users, this MAY permit remote users to gain root privileges.<br><br>Hadoop 3.3.0 updated the \"<a target=\"_blank\" rel=\"nofollow\" href=\"https://hadoop.apache.org/docs/stable/hadoop-yarn/hadoop-yarn-site/SecureContainer.html\">YARN Secure Containers</a>\" to add a feature for executing user-submitted applications in isolated linux containers.<br><br>The native binary HADOOP_HOME/bin/container-executor is used to launch these containers; it must be owned by root and have the suid bit set in order for the YARN processes to run the containers as the specific users submitting the jobs.<br><br>The patch \"<a target=\"_blank\" rel=\"nofollow\" href=\"https://issues.apache.org/jira/browse/YARN-10495\">YARN-10495</a>. make the rpath of container-executor configurable\" modified the library loading path for loading .so files from \"$ORIGIN/\" to \"\"$ORIGIN/:../lib/native/\". This is the a path through which libcrypto.so is located. Thus it is is possible for a user with reduced privileges to install a malicious libcrypto library into a path to which they have write access, invoke the container-executor command, and have their modified library executed as root.<br>If the YARN cluster is accepting work from remote (authenticated) users, and these users' submitted job are executed in the physical host, rather than a container, then the CVE permits remote users to gain root privileges.<br><br>The fix for the vulnerability is to revert the change, which is done in <a target=\"_blank\" rel=\"nofollow\" href=\"https://issues.apache.org/jira/browse/YARN-11441\">YARN-11441</a>, \"Revert YARN-10495\". This patch is in hadoop-3.3.5.<br><br>To determine whether a version of container-executor is vulnerable, use the readelf command. If the RUNPATH or RPATH value contains the relative path \"./lib/native/\" then it  is at risk<br><br><tt>$ readelf -d container-executor|grep <span style=\"background-color: rgb(255, 255, 255);\">'RUNPATH\\|RPATH'</span> <br>0x000000000000001d (RUNPATH)  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Library runpath: [$ORIGIN/:../lib/native/]</tt><br><br>If it does not, then it is safe:<br><br><tt>$ readelf -d container-executor|grep <span style=\"background-color: rgb(255, 255, 255);\">'RUNPATH\\|RPATH'</span> <br>0x000000000000001d (RUNPATH)  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Library runpath: [$ORIGIN/]</tt><br><br>For an at-risk version of container-executor to enable privilege escalation, the owner must be root and the suid bit must be set<br><tt><br>$ ls -laF /opt/hadoop/bin/container-executor<br>---Sr-s---. 1 root hadoop 802968 May 9 20:21 /opt/hadoop/bin/container-executor</tt><br><br>A safe installation lacks the suid bit; ideally is also not owned by root.<br><br><tt>$ ls -laF /opt/hadoop/bin/container-executor<br>-rwxr-xr-x. 1 yarn hadoop 802968 May 9 20:21 /opt/hadoop/bin/container-executor</tt><br><br>This configuration does not support Yarn Secure Containers, but all other hadoop services, including YARN job execution outside secure containers continue to work.<br><br><br><br><br>"}],"value":"Relative library resolution in linux container-executor binary in Apache Hadoop 3.3.1-3.3.4 on Linux allows local user to gain root privileges. If the YARN cluster is accepting work from remote (authenticated) users, this MAY permit remote users to gain root privileges.\n\nHadoop 3.3.0 updated the \" YARN Secure Containers https://hadoop.apache.org/docs/stable/hadoop-yarn/hadoop-yarn-site/SecureContainer.html \" to add a feature for executing user-submitted applications in isolated linux containers.\n\nThe native binary HADOOP_HOME/bin/container-executor is used to launch these containers; it must be owned by root and have the suid bit set in order for the YARN processes to run the containers as the specific users submitting the jobs.\n\nThe patch \" YARN-10495 https://issues.apache.org/jira/browse/YARN-10495 . make the rpath of container-executor configurable\" modified the library loading path for loading .so files from \"$ORIGIN/\" to \"\"$ORIGIN/:../lib/native/\". This is the a path through which libcrypto.so is located. Thus it is is possible for a user with reduced privileges to install a malicious libcrypto library into a path to which they have write access, invoke the container-executor command, and have their modified library executed as root.\nIf the YARN cluster is accepting work from remote (authenticated) users, and these users' submitted job are executed in the physical host, rather than a container, then the CVE permits remote users to gain root privileges.\n\nThe fix for the vulnerability is to revert the change, which is done in  YARN-11441 https://issues.apache.org/jira/browse/YARN-11441 , \"Revert YARN-10495\". This patch is in hadoop-3.3.5.\n\nTo determine whether a version of container-executor is vulnerable, use the readelf command. If the RUNPATH or RPATH value contains the relative path \"./lib/native/\" then it  is at risk\n\n$ readelf -d container-executor|grep 'RUNPATH\\|RPATH' \n0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN/:../lib/native/]\n\nIf it does not, then it is safe:\n\n$ readelf -d container-executor|grep 'RUNPATH\\|RPATH' \n0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN/]\n\nFor an at-risk version of container-executor to enable privilege escalation, the owner must be root and the suid bit must be set\n\n$ ls -laF /opt/hadoop/bin/container-executor\n---Sr-s---. 1 root hadoop 802968 May 9 20:21 /opt/hadoop/bin/container-executor\n\nA safe installation lacks the suid bit; ideally is also not owned by root.\n\n$ ls -laF /opt/hadoop/bin/container-executor\n-rwxr-xr-x. 1 yarn hadoop 802968 May 9 20:21 /opt/hadoop/bin/container-executor\n\nThis configuration does not support Yarn Secure Containers, but all other hadoop services, including YARN job execution outside secure containers continue to work."}],"metrics":[{"other":{"content":{"text":"critical"},"type":"Textual description of severity"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-426","description":"CWE-426 Untrusted Search Path","lang":"en","type":"CWE"}]}],"providerMetadata":{"orgId":"f0158376-9dc2-43b6-827c-5f631a4d8d09","shortName":"apache","dateUpdated":"2024-01-12T14:06:17.973Z"},"references":[{"tags":["issue-tracking"],"url":"https://issues.apache.org/jira/browse/YARN-11441"},{"tags":["vendor-advisory"],"url":"https://hadoop.apache.org/cve_list.html"},{"tags":["vendor-advisory"],"url":"https://lists.apache.org/thread/q9qpdlv952gb4kphpndd5phvl7fkh71r"},{"url":"https://security.netapp.com/advisory/ntap-20240112-0001/"}],"source":{"defect":["YARN-11441"],"discovery":"EXTERNAL"},"title":"Privilege escalation in Apache Hadoop Yarn container-executor binary on Linux systems","workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<ol><li><span style=\"background-color: var(--wht);\">Upgrade to Apache Hadoop 3.3.5</span></li><li><span style=\"background-color: var(--wht);\">If&nbsp;Yarn Secure Containers are not required, remove all execute permissions on bin/container-executor ; change its owner from root, or simply delete it.</span></li><li><span style=\"background-color: var(--wht);\">If Yarn Secure Containers are required on a vulnerable release and upgrade is not possible, replace the container-executor&nbsp;binary with that of the 3.3.5 release.</span><br></li></ol>As most Hadoop installations do not use Yarn Secure Containers, removing execute permissions from the container-executor binary a is sufficient to secure the systems; deletion ensures that no security scanners will report the issue."}],"value":"*  Upgrade to Apache Hadoop 3.3.5\n  *  If Yarn Secure Containers are not required, remove all execute permissions on bin/container-executor ; change its owner from root, or simply delete it.\n  *  If Yarn Secure Containers are required on a vulnerable release and upgrade is not possible, replace the container-executor binary with that of the 3.3.5 release.\n\nAs most Hadoop installations do not use Yarn Secure Containers, removing execute permissions from the container-executor binary a is sufficient to secure the systems; deletion ensures that no security scanners will report the issue."}],"x_generator":{"engine":"Vulnogram 0.1.0-dev"}},"adp":[{"affected":[{"vendor":"apache","product":"hadoop","cpes":["cpe:2.3:a:apache:hadoop:3.3.1:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","versions":[{"version":"3.3.1","status":"affected","lessThan":"3.3.5","versionType":"semver"}]}],"metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.5,"attackVector":"NETWORK","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"HIGH","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"timestamp":"2024-07-19T03:55:27.490258Z","id":"CVE-2023-26031","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2024-07-29T13:09:24.015Z"}},{"providerMetadata":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2024-08-02T11:39:06.596Z"},"title":"CVE Program Container","references":[{"tags":["issue-tracking","x_transferred"],"url":"https://issues.apache.org/jira/browse/YARN-11441"},{"tags":["vendor-advisory","x_transferred"],"url":"https://hadoop.apache.org/cve_list.html"},{"tags":["vendor-advisory","x_transferred"],"url":"https://lists.apache.org/thread/q9qpdlv952gb4kphpndd5phvl7fkh71r"},{"url":"https://security.netapp.com/advisory/ntap-20240112-0001/","tags":["x_transferred"]}]}]}}