Inserting command output into multiline string
If GUAC_PASSWORD is a string like -e foo or /etc/*, that's going to create problems.  

Quote the input and avoid echo altogether.  While you're at it, whitelist the checksum output, making head redundant:

HASHED=$( tr -d '\n' &lt;&lt;&lt;"$GUAC_PASSWORD" | sha256sum | tr -dc a-f0-9 )


edit: suppress newline added by &lt;&lt;&lt;