Unauthenticated attackers can perform SQL injection attacks because the software fails to properly sanitize and escape values taken from requests before using them in SQL statements. This occurs due to insufficient escaping of user-supplied parameters and a lack of sufficient preparation of the existing SQL query, allowing attackers to append additional queries to extract sensitive information from the database.