Officially? Yes, Couchsurfing is banned in Iran.
Now, take a deep breath and stay with me. In real life, things are nowhere near as scary as they may sound. Yes, Couchsurfing is forbidden in Iran, but so are many other things. Wearing a tie, women riding bicycles, singing in the streets, smoking weed. Does this mean that nobody gets high in Iran? No, it does not. It means that Iranians know how to be discreet about it.
Further Reading: 82 things to know before you travel to Iran
The same applies with Couchsurfing in Iran. Be cool and you won’t have any issues. There’s no need to be paranoid, but you also shouldn’t tell just anybody that you’re staying with a Couchsurfing host. If asked by the police, say you’re staying in a hostel. Mentioning your host by name can potentially mean trouble for your host, which is the last thing you want to happen. You won’t rot away in an Iranian prison if you do “get caught”, but you might face some unpleasant questioning.