At least two judges were among 21 court staff assaulted in courtrooms in the past two years, documents released under the Official Information Act show.
And thousands of weapons or potential weapons were seized in that period by court security staff.
Confiscated weapons included knuckledusters, a metal bar, dozens of knives, ammunition, a piece of wood with a protruding nail and a ball and chain, the Ministry of Justice figures reveal.
"Potential weapons" included penknives, letter openers and builders' tools.
At least two judges were assaulted in 2011 and 2012.
Six court staff were assaulted last year, in Invercargill, Hastings, Christchurch, Te Kuiti, Invercargill and Waitakere.
But the number of assaults was down on 2011, when 15 staff were attacked.
Other figures reveal 7008 "potential weapons" were confiscated after 1,304,664 people were searched by court security staff in the 2011/12 financial year.
Many of the items were later returned to their owners.
A high-profile criminal defence lawyer sparked a serious security breach at Christchurch District Court when an airgun was found in his briefcase in March.
District Courts general manager Tony Fisher said the lawyer had not been prosecuted for the security breach.
"We have the odd slip up ... but that was down to a security officer not properly screening someone he knew well.
"We have not let the matter drop. The investigation into the incident is ongoing but security processes have been reviewed, as is the case following any significant security breach."
Jamie Beattie Lockett was charged with taking an offensive weapon to the Auckland District Court in 2011 after he was stopped by court staff allegedly with a rope with a solid metal ball woven into the end.
Court security officers were established under the Court Security Act 1999 after a fatal stabbing at Palmerston North District Court.
Court security was beefed up in 2009, and $9 million has been spent over four years on it.
The extra money provided a further 45 court security officers, eight new walk-through metal detectors, and 10 new baggage x-ray machines.
Mr Fisher said the decision to enhance screening was a good one.
"The number of potential weapons that people have tried to bring in to court has fallen from one in every 77 people screened in 2008 to one in every 186 in 2012."
The total number of incidents reported has also dropped.