Not sure if it's a bug, but useradd and adduser can be used to generate invalid group name triggering security(8) report:
Checking the /etc/group file: Group test$ has non-alphanumeric characters. To reproduce, run "useradd test$" or use adduser to add test$ The username is valid per adduser(8), should the group generation fail when adding a group with $ in it? Using groupadd(8) to add such a group will fail: $ groupadd test$ groupadd: invalid group name `test$'