9.8 CVE-2023-2917

Privilege Escalation RCE Injection SQL Buffer Overflow Path Traversal RCI XSS
 

The Rockwell Automation Thinmanager Thinserver is impacted by an improper input validation vulnerability.  Due to an improper input validation, a path traversal vulnerability exists, via the filename field, when the ThinManager processes a certain function. If exploited, an unauthenticated remote attacker can upload arbitrary files to any directory on the disk drive where ThinServer.exe is installed.  A malicious user could exploit this vulnerability by sending a crafted synchronization protocol message and potentially gain remote code execution abilities.
https://nvd.nist.gov/vuln/detail/CVE-2023-2917

Categories

CWE-20 : Improper Input Validation
The product receives input or data, but it doesnot validate or incorrectly validates that the input has theproperties that are required to process the data safely andcorrectly. When custom input validation is required, such as when enforcing business rules, manual analysis is necessary to ensure that the validation is properly implemented. Fuzzing techniques can be useful for detecting input validation errors. When unexpected inputs are provided to the software, the software should not crash or otherwise become unstable, and it should generate application-controlled error messages. If exceptions or interpreter-generated error messages occur, this indicates that the input was not detected and handled within the application logic itself. Consider using language-theoretic security (LangSec) techniques that characterize inputs using a formal language and build "recognizers" for that language. This effectively requires parsing to be a distinct layer that effectively enforces a boundary between raw input and internal data representations, instead of allowing parser code to be scattered throughout the program, where it could be subject to errors or inconsistencies that create weaknesses. [REF-1109] [REF-1110] [REF-1111] Use an input validation framework such as Struts or the OWASP ESAPI Validation API. Note that using a framework does not automatically address all input validation problems; be mindful of weaknesses that could arise from misusing the framework itself (CWE-1173). Understand all the potential areas where untrusted inputs can enter the product, including but not limited to: parameters or arguments, cookies, anything read from the network, environment variables, reverse DNS lookups, query results, request headers, URL components, e-mail, files, filenames, databases, and any external systems that provide data to the application. Remember that such inputs may be obtained indirectly through API calls. When your application combines data from multiple sources, perform the validation after the sources have been combined. The individual data elements may pass the validation step but violate the intended restrictions after they have been combined. Be especially careful to validate all input when invoking code that crosses language boundaries, such as from an interpreted language to native code. This could create an unexpected interaction between the language boundaries. Ensure that you are not violating any of the expectations of the language with which you are interfacing. For example, even though Java may not be susceptible to buffer overflows, providing a large argument in a call to native code might trigger an overflow. Directly convert your input type into the expected data type, such as using a conversion function that translates a string into a number. After converting to the expected data type, ensure that the input's values fall within the expected range of allowable values and that multi-field consistencies are maintained. When exchanging data between components, ensure that both components are using the same character encoding. Ensure that the proper encoding is applied at each interface. Explicitly set the encoding you are using whenever the protocol allows you to do so. Large language model (LLM) management tool does notvalidate the format of a digest value (CWE-1287) from aprivate, untrusted model registry, enabling relativepath traversal (CWE-23), a.k.a. Probllama Chain: a learning management tool debugger uses external input to locate previous session logs (CWE-73) and does not properly validate the given path (CWE-20), allowing for filesystem path traversal using "../" sequences (CWE-24) Chain: improper input validation (CWE-20) leads to integer overflow (CWE-190) in mobile OS, as exploited in the wild per CISA KEV. Chain: improper input validation (CWE-20) leads to integer overflow (CWE-190) in mobile OS, as exploited in the wild per CISA KEV. Chain: backslash followed by a newline can bypass a validation step (CWE-20), leading to eval injection (CWE-95), as exploited in the wild per CISA KEV. Chain: insufficient input validation (CWE-20) in browser allows heap corruption (CWE-787), as exploited in the wild per CISA KEV. Chain: improper input validation (CWE-20) in username parameter, leading to OS command injection (CWE-78), as exploited in the wild per CISA KEV. Chain: security product has improper input validation (CWE-20) leading to directory traversal (CWE-22), as exploited in the wild per CISA KEV. Improper input validation of HTTP requests in IP phone, as exploited in the wild per CISA KEV. Chain: improper input validation (CWE-20) in firewall product leads to XSS (CWE-79), as exploited in the wild per CISA KEV. Chain: caching proxy server has improper input validation (CWE-20) of headers, allowing HTTP response smuggling (CWE-444) using an "LF line ending" Eval injection in Perl program using an ID that should only contain hyphens and numbers. SQL injection through an ID that was supposed to be numeric. lack of input validation in spreadsheet program leads to buffer overflows, integer overflows, array index errors, and memory corruption. insufficient validation enables XSS driver in security product allows code execution due to insufficient validation infinite loop from DNS packet with a label that points to itself infinite loop from DNS packet with a label that points to itself missing parameter leads to crash HTTP request with missing protocol version number leads to crash request with missing parameters leads to information exposure system crash with offset value that is inconsistent with packet size size field that is inconsistent with packet size leads to buffer over-read product uses a denylist to identify potentially dangerous content, allowing attacker to bypass a warning security bypass via an extra header empty packet triggers reboot incomplete denylist allows SQL injection NUL byte in theme name causes directory traversal impact to be worse kernel does not validate an incoming pointer before dereferencing it anti-virus product has insufficient input validation of hooked SSDT functions, allowing code execution anti-virus product allows DoS via zero-length field driver does not validate input from userland to the kernel kernel does not validate parameters sent in from userland, allowing code execution lack of validation of string length fields allows memory consumption or buffer over-read lack of validation of length field leads to infinite loop lack of validation of input to an IOCTL allows code execution zero-length attachment causes crash zero-length input causes free of uninitialized pointer crash via a malformed frame structure infinite loop from a long SMTP request router crashes with a malformed packet packet with invalid version number leads to NULL pointer dereference crash via multiple "." characters in file extension

CWE-22 : Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. "Path traversal" is preferred over "directory traversal," but both terms are attack-focused. Automated techniques can find areas where path traversal weaknesses exist. However, tuning or customization may be required to remove or de-prioritize path-traversal problems that are only exploitable by the product's administrator - or other privileged users - and thus potentially valid behavior or, at worst, a bug instead of a vulnerability. Manual white box techniques may be able to provide sufficient code coverage and reduction of false positives if all file access operations can be assessed within limited time constraints. 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. Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth. 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. When using PHP, configure the application so that it does not use register_globals. During implementation, develop the application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues. Large language model (LLM) management tool does notvalidate the format of a digest value (CWE-1287) from aprivate, untrusted model registry, enabling relativepath traversal (CWE-23), a.k.a. Probllama Chain: API for text generation using Large Language Models (LLMs) doesnot include the "\" Windows folder separator in its denylist (CWE-184)when attempting to prevent Local File Inclusion via path traversal(CWE-22), allowing deletion of arbitrary files on Windows systems. Chain: a learning management tool debugger uses external input to locate previous session logs (CWE-73) and does not properly validate the given path (CWE-20), allowing for filesystem path traversal using "../" sequences (CWE-24) Python package manager does not correctly restrict the filename specified in a Content-Disposition header, allowing arbitrary file read using path traversal sequences such as "../" Python package constructs filenames using an unsafe os.path.join call on untrusted input, allowing absolute path traversal because os.path.join resets the pathname to an absolute path that is specified as part of the input. directory traversal in Go-based Kubernetes operator app allows accessing data from the controller's pod file system via ../ sequences in a yaml file Chain: Cloud computing virtualization platform does not require authentication for upload of a tar format file (CWE-306), then uses .. path traversal sequences (CWE-23) in the file to access unexpected files, as exploited in the wild per CISA KEV. a Kubernetes package manager written in Go allows malicious plugins to inject path traversal sequences into a plugin archive ("Zip slip") to copy a file outside the intended directory Chain: security product has improper input validation (CWE-20) leading to directory traversal (CWE-22), as exploited in the wild per CISA KEV. Go-based archive library allows extraction of files to locations outside of the target folder with "../" path traversal sequences in filenames in a zip file, aka "Zip Slip" Newsletter module allows reading arbitrary files using "../" sequences. Chain: PHP app uses extract for register_globals compatibility layer (CWE-621), enabling path traversal (CWE-22) FTP server allows deletion of arbitrary files using ".." in the DELE command. FTP server allows creation of arbitrary directories using ".." in the MKD command. FTP service for a Bluetooth device allows listing of directories, and creation or reading of files using ".." sequences. Software package maintenance program allows overwriting arbitrary files using "../" sequences. Bulletin board allows attackers to determine the existence of files using the avatar. PHP program allows arbitrary code execution using ".." in filenames that are fed to the include() function. Overwrite of files using a .. in a Torrent file. Chat program allows overwriting files using a custom smiley request. Chain: external control of values for user's desired language and theme enables path traversal. Chain: library file sends a redirect if it is directly requested but continues to execute, allowing remote file inclusion and path traversal.

References

PSIRT@rockwellautomation.com

af854a3a-2127-422b-91ae-364da2661108


 

CPE

cpe start end
Configuration 1
cpe:2.3:a:rockwellautomation:thinmanager_thinserver:*:*:*:*:*:*:*:* >= 11.0.0 <= 11.0.6
cpe:2.3:a:rockwellautomation:thinmanager_thinserver:*:*:*:*:*:*:*:* >= 11.1.0 <= 11.1.6
cpe:2.3:a:rockwellautomation:thinmanager_thinserver:*:*:*:*:*:*:*:* >= 11.2.0 <= 11.2.7
cpe:2.3:a:rockwellautomation:thinmanager_thinserver:*:*:*:*:*:*:*:* >= 12.0.0 <= 12.0.5
cpe:2.3:a:rockwellautomation:thinmanager_thinserver:*:*:*:*:*:*:*:* >= 12.1.0 <= 12.1.6
cpe:2.3:a:rockwellautomation:thinmanager_thinserver:*:*:*:*:*:*:*:* >= 13.0.0 <= 13.0.2
cpe:2.3:a:rockwellautomation:thinmanager_thinserver:13.1.0:*:*:*:*:*:*:*


REMEDIATION




EXPLOITS


Exploit-db.com

id description date
No known exploits

POC Github

Url
No known exploits

Other Nist (github, ...)

Url
No known exploits


CAPEC


Common Attack Pattern Enumerations and Classifications

id description severity
10 Buffer Overflow via Environment Variables
High
101 Server Side Include (SSI) Injection
High
104 Cross Zone Scripting
High
108 Command Line Execution through SQL Injection
Very High
109 Object Relational Mapping Injection
High
110 SQL Injection through SOAP Parameter Tampering
Very High
120 Double Encoding
Medium
13 Subverting Environment Variable Values
Very High
135 Format String Injection
High
136 LDAP Injection
High
14 Client-side Injection-induced Buffer Overflow
High
153 Input Data Manipulation
Medium
182 Flash Injection
Medium
209 XSS Using MIME Type Mismatch
Medium
22 Exploiting Trust in Client
High
23 File Content Injection
Very High
230 Serialized Data with Nested Payloads
High
231 Oversized Serialized Data Payloads
High
24 Filter Failure through Buffer Overflow
High
250 XML Injection
261 Fuzzing for garnering other adjacent user/sensitive data
Medium
267 Leverage Alternate Encoding
High
28 Fuzzing
Medium
3 Using Leading 'Ghost' Character Sequences to Bypass Input Filters
Medium
31 Accessing/Intercepting/Modifying HTTP Cookies
High
42 MIME Conversion
High
43 Exploiting Multiple Input Interpretation Layers
High
45 Buffer Overflow via Symbolic Links
High
46 Overflow Variables and Tags
High
47 Buffer Overflow via Parameter Expansion
High
473 Signature Spoof
52 Embedding NULL Bytes
High
53 Postfix, Null Terminate, and Backslash
High
588 DOM-Based XSS
Very High
63 Cross-Site Scripting (XSS)
Very High
64 Using Slashes and URL Encoding Combined to Bypass Validation Logic
High
664 Server Side Request Forgery
High
67 String Format Overflow in syslog()
Very High
7 Blind SQL Injection
High
71 Using Unicode Encoding to Bypass Validation Logic
High
72 URL Encoding
High
73 User-Controlled Filename
High
78 Using Escaped Slashes in Alternate Encoding
High
79 Using Slashes in Alternate Encoding
High
8 Buffer Overflow in an API Call
High
80 Using UTF-8 Encoding to Bypass Validation Logic
High
81 Web Server Logs Tampering
High
83 XPath Injection
High
85 AJAX Footprinting
Low
88 OS Command Injection
High
9 Buffer Overflow in Local Command-Line Utilities
High
126 Path Traversal
Very High
76 Manipulating Web Input to File System Calls
Very High


MITRE


Techniques

id description
T1027 Obfuscated Files or Information
T1036.001 Masquerading: Invalid Code Signature
T1539 Steal Web Session Cookie
T1553.002 Subvert Trust Controls:Code Signing
T1562.003 Impair Defenses:Impair Command History Logging
T1574.006 Hijack Execution Flow:Dynamic Linker Hijacking
T1574.007 Hijack Execution Flow:Path Interception by PATH Environment Variable
© 2022 The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation.

Mitigations

id description
M1017 Ensure that a finite amount of ingress points to a software deployment system exist with restricted access for those required to allow and enable newly deployed software.
M1045 Require signed binaries.
M1017 Train users to identify aspects of phishing attempts where they're asked to enter credentials into a site that has the incorrect domain for the application they are logging into. Additionally, train users not to run untrusted JavaScript in their browser, such as by copying and pasting code or dragging and dropping bookmarklets.
M1028 Make sure that the <code>HISTCONTROL</code> environment variable is set to “ignoredups” instead of “ignoreboth” or “ignorespace”.
M1028 When System Integrity Protection (SIP) is enabled in macOS, the aforementioned environment variables are ignored when executing protected binaries. Third-party applications can also leverage Apple’s Hardened Runtime, ensuring these environment variables are subject to imposed restrictions. Admins can add restrictions to applications by setting the setuid and/or setgid bits, use entitlements, or have a __RESTRICT segment in the Mach-O binary.
M1022 Ensure that proper permissions and directory access control are set to deny users the ability to write files to the top-level directory <code>C:</code> and system directories, such as <code>C:Windows</code>, to reduce places where malicious files could be placed for execution. Require that all executables be placed in write-protected directories.
© 2022 The MITRE Corporation. Esta obra se reproduce y distribuye con el permiso de The MITRE Corporation.