Usually, security errors are not related to the battery. What security error exactly?
And what new battery: third party one or replacement battery from the maker? What maker, what model of laptop?
I started getting a primary (internal) battery error on my computer at start up~ I replace the battery but it still is giving me trouble~ the battery was new~ before it wouldn't even load internet without resetting clock ~ with new battery it now loads internet but gives a security error.