The incident was topical given it is Cyber Smart Week.
Nash did not want to call himself naive, but said he was "a little bit blase" when it came to cyber security, and didn't regularly change his passwords.
"Certainly now we're going to go and change all passwords, but do it on a regular basis as well.
"I just don't think it'll happen to me, but it has happened."
Nash pointed to one of the people in the audience and asked when he had last changed his passwords.
"Well, minister, as it happens I also got hacked in the last week. So last week," the man replied.
Nash launched Mastercard's guide "Staying Safe Online: Cyber Safety Guide for New Zealand Business", and said it provided "some really helpful ways that businesses can help protect themselves from cyber fraud and attack".
He also recommend people visit business.govt.nz to watch a webinar on cyber security.
Despite the risks, Nash encouraged small business owners to make the move online if they hadn't already, as it was a way to increase growth and productivity.
"As we're asking more and more businesses to engage with the internet ... we need to ensure we're also open and honest about the risks."
Country manager for Mastercard New Zealand and Pacific Islands Ruth Riviere said card fraud was costing businesses about five cents for every thousand dollars.
"I think in general cards are a very safe way to pay. If there's fraud on your account, you as a consumer are always protected."
Mastercard cardholders would not be held responsible for unauthorised transactions if they reported their card as lost or stolen as soon as they are aware it is missing or suspect unauthorised use of their card, she said.
Kiwis spent more than $4 billion online last year, and with online spending now growing faster than traditional payments, it was more important than ever for small businesses to pay attention to their cyber security.
"Increasingly, customers expect choice when it comes to how they purchase goods and services, and accepting online payments delivers that," she said.
Staying safe online was not complex or expensive she said.
Top tips from the "Staying Safe Online" guide included researching or talking to the bank about online payment options, talking to the bank about online authentication methods, being cautious of suspicious orders, such as unusually large orders, or those requiring urgent delivery, installing and updating security software, and keeping all devices secure.
That included updating security software, changing passwords, and backing up data regularly - storing it offsite and offline.