I just ran into this myself, and I don't know if this information is still relevant for you, but I'm still posting in case someone else finds it useful.
I tried to execute a script that implements Cyberark, called it from within the containing folder as such:
cd /containingFolder
bash script.sh
and got that same error... But when invoking it as such:
bash /containingFolder/script.sh
The script ran with no errors.
This is due to Cyberark's "autorized path" policy. I went into the dashboard and realized that /containingFolder/ was an authorized path for my Cyberark installation, meaning other scripts outside this path, are NOT authorized to invoke Cyberark implementations. And this is why it must be called with an absolute path every time.