OpenEMR contains a flaw that may allow an attacker to carry out an SQL injection attack. The issue is due to the /interface/main/messages/messages.php script not properly sanitizing user-supplied input to the 'sortby', 'sortorder', and 'begin' parameters. This may allow an attacker to inject or manipulate SQL queries in the back-end database, allowing for the manipulation or disclosure of arbitrary data.