CVE-2024-23897 is an arbitrary file read vulnerability through the CLI can lead to unauthenticated RCE
the jenkins CLI uses the args4j library which has the feature to access a file's content by using @ following the path of file. which allows and attacker to read any file in the system, ** Attackers with Overall/Read permission can read entire files. ** Attackers without Overall/Read permission can read the first few lines of files
Our goal is to achieve unauthenticated code execution using this vulnerability, which is very straight if we don't consider the limitations which we mentioned above.
WHY? we don't need to read any file more than the first 2 lines to get what we want (RCE).after analysing the possible ways, I can confirm that there are 3 possible and effictive ways of unauthenticated RCE, which doesn't need any special configuration of the jenkins server or installing any plugins, which means everything we need is in default installation.
- "remember me " cookie
- REDACTED
- REDACTED Note: