Schools are to be given advice on how to disable a glitch that allows pupils sitting online spelling tests to right-click their mouse and find the answer.
It follows the discovery by teachers that children familiar with traditional computer spellcheckers were simply applying it to the tests.
The Scottish National Standardised Assessments were introduced to assess progress in four different age groups.
The government said the issue had only affected a "small number" of questions.
A spokesman said the issue was not with the Scottish National Standardised Assessments (SNSA) but with browser or device settings on some machines.
Former head teacher George Gilchrist tweeted about the issue after it emerged primary seven pupils were using the online spellchecker on the test.
He wrote: "SNSA P7 spelling. Pupils asked to correct spelling of words. P7 pupils worked out if you right click on your answer, the computer tells you if it is correct! Brilliant! 😂"
Skip Twitter post by @GilchristGeorge
SNSA P7 spelling. Pupils asked to correct spelling of words. P7 pupils worked out if you right click on your answer, the computer tells you if it is correct! Brilliant!
12:29 PM - May 16, 2018
Twitter Ads info and privacy
Introduced in 2017, the spelling test asks children to identify misspelt words.
However, on some school computers the words were highlighted with a red line. Pupils who right-clicked on the words were then able to access the correct spelling.
he web-based SNSA tool enables teachers to administer online literacy and numeracy tests for pupils in P1, P4, P7 and S3, which are marked and scored automatically.
Education Secretary John Swinney said they would give teachers "objective and comparable information" to help them identify pupils' specific needs.
A Scottish government spokesperson said: "A small number of questions in the P4, P7 and S3 writing assessment were affected by this issue.
"Advice is being given to schools about how to disable the spellchecking function.
"There is no pass or fail in the assessment, which is one element in a range of evidence a teacher will gather on a child or young person's progress."