But Ardern said the 2004 law did not reflect the digital age where someone's letter could be posted online and shared widely, nor did it reference hate speech.
"People should be safe from those behind bars, whether that's individual threats or the spread of hatred, and that's why we're taking steps to make sure that is the case," she said at her post-Cabinet press conference.
She said the accused Christchurch terrorist had sought notoriety by spreading his views, and the law needed to capture that kind of "grotesque behaviour".
"This is not about one letter reaching one person. There is the ability for these letters to be broadcast, and if they are, to do much wider harm."
She conceded the current law was sufficient to block the controversial letters that should not have been sent, but that didn't mean the law couldn't be improved.
"What we don't want is, further down the track, for individuals to contest some of the decisions being made by Corrections."
She said prisoner mail that did not pass a common-sense test should be blocked in the same way that hate speech cannot legally be posted on social media platforms.
Online hate speech is often expressed in coded language in an attempt to avoid being flagged as harmful content.
Certain numbers are used to reference Adolf Hitler, "RAHOWA" is used for "racial holy war", and "ZOG" or "JOG" relate to Zionist or Jewish conspiracy theories.
Other examples include "Stacey", used to mean an attractive woman who is only interested in attractive men, or "snowflake", a derogatory term used to describe left-wingers.
Ardern referred to the challenge of identifying coded language while in Paris in May for the Christchurch Call summit, and today she said that New Zealand agencies were equipped to identify coded language.
"Keeping that in mind as well will be critical in getting this legislation right."
Ardern said the issue with the letters was different to the Christchurch Call, as the former was about screening prisoner mail appropriately, and the latter was about dealing with a terrorist attack and how it can be broadcast and spread widely online.
Last week Corrections Minister Kelvin Davis told the Herald that hate speech could be looked at as grounds to withhold prisoners' mail.
Work was being done to see if the law was fit for purpose and Ministers could make decisions within two weeks, Ardern said.
This morning Stevenson said the law could be strengthened, but gave no further details.
National Party leader Simon Bridges said earlier today that the law was adequate and just needed to be applied competently.
Corrections has already strengthened processes around the mail to and from the accused Christchurch gunman, as well as all prisoners of high concern.
Today Corrections launched an 0800 number and email address for people to use if they received mail from prisoner they didn't want.