Wallner, 27, was attacked in a robbery attempt near a metro station in the south Stockholm suburb of Alby.
The Green Party’s nomination committee had recently suggested Wallner as a candidate to take over as the Greens’ party secretary ahead of the party’s congress later in May.
“It’s true that Anders happened to get caught up in this incident. I’ve spoken with him. He’s in hospital at the moment and he is feeling well considering the circumstances,” Green Party chief secretary Per Ängquist told the TT news agency.
Police have launched a preliminary investigation into aggravated robbery.
The knife attack reportedly occurred shortly after midnight. According to police, Wallner managed to proceed to the Skärholmen metro station where police later found him seriously wounded.
“The person was taken by ambulance to Stockholm South General Hospital (Södersjukhuset). We couldn’t interview him during the morning because he needed to be operated,” duty officer Stefan Persson of the Stockholm police’s southern district, told TT.
Wallner had previously served as secretary to Green Party spokesperson Maria Wetterstrand.
Later on Sunday, Wallner posted a message on his Twitter account confirming he was doing will.
“Feeling fine under the circumstances and thanks for everyone’s kind greetings which keep me convinced of the goodness of humankind,” he wrote.