This is a question of common misconception. The short answer is you get NO warmonger score penalty with third parties that have not met either of you at the time it happens (not sure if it suffices they haven't met the target or haven't met you, but if they haven't met either, you certainly don't get a penalty).
HOWEVER you will also get a warmonger rating based on the number of civs you have eliminated from the game. If you have eliminated 25 % +/- 50 % (depending on the third party's acceptance of warmongers) of the civs in game, you will get a severe warmonger lable across the board, no matter whether they've met you at the time of action or not. Notice that this will trigger as low as killing 12.5 % of civs (city state = civ in this regard) with civs with maximum warmonger hate. If you cross 40 % +/- 50 % (again depending on the third party's acceptance of warmongers) you will get the critical warmonger across the board. Notice that the warmonger lable earned this way does not decay over time.
So, depending on the total number of civs and citystates there are in the game, wiping out even one civ might push you over the limit with civs that are very hostile to warmongers, even if they haven't met either of you at the time of action.