There are two CVV numbers, CVV1 and CVV2. CVV1 is used to verify that the card is in the hands of a merchant and is recorded on the card's magnetic stripe. CVV1 is "security by obscurity" - it's not printed on the card so it's supposed to be difficult for scammers to figure out what it is. But of course it's part of the information exchanged in a POS transaction, and magstripe readers are now a dime a dozen anyway - so as a security measure it's basically obsolete.
CVV2 is used for "card not in hand" transactions (i.e., card not in the hands of the merchant, which means phone or online orders). According to
this Wikipedia entry, the CVV2 code printed on the card is not encoded in the card's magstripe data, so unless it's entered as part of a transaction (and that's not the case for "card in hand" transactions) I don't see how it could have been harvested as part of a POS terminal attack.