I'm currently using the credentials plugin to encrypt may username and password . However, in my pipeline script I found a way to hack the password by inserting a character in the password this causes the password to be printed clearly and since I'm the person who added the character if I removed it then I have the password.
You should probably be filing this as a [Jenkins SECURITY Issue|https://jenkins.io/security/], along with the details to reproduce. Only you, tne Security Admin and the plugin maintainers will see the details.]
This seems a duplicate of JENKINS-50242; as documented, Jenkins does not attempt to prevent malicious pipelines from revealing credentials to which they have acess access. See also JENKINS-42950 and [Limitations of Credentials Masking|https://jenkins.io/blog/2019/02/21/credentials-masking/] (aka WEBSITE-610).