The first issue arose over a line of code which was incorrect.
The Minister said that the line, one of 50,000, related to Junior Cert results, which were included as part of the calculated grades system.
Under the scheme, a students core subjects – English, Irish and Maths – were meant to be included alongside their two best non-core subjects.
Under the error, some students had their worst two subjects included.
The second mistake surrounded CSPE, which was supposed to be excluded from results, but was actually included.
6,500 students received a lower mark, and will now receive a higher grade.
A total of 7,200 grades were affected.
Students who received a higher grade than they should have will keep their original result.
Ms Foley said that the Department of Education is working with the CAO to see how students can enter a course that they should have been offered originally.
Those affected will be contacted by text message.
Ms Foley apologised to all students on behalf of the department.
Taoiseach Micheal Martin had earlier told the Dail that the problems were ‘technical’ and were related to coding.
He said that two mistakes were confirmed, the first of which were found by external consultants.
The second issue was discovered by further checks by the Department of Health.
Labour leader Alan Kelly dropped the bombshell query in Leinster House just before 1pm.
He was angry that the Government didn’t reveal it first, that it had to be forced out of him on the floor of the Dáil.
Mr Kelly said: “If I didn’t ask you about this, we wouldn’t be talking about this.
“You’re going to make sure that people who have been offered places are demoted.
The Taoiseach in reply said that other political parties or their spokespersons hadn’t been told because the priority was to tell the students first.
The affected students are being contacted this afternoon and a special hotline is being opened this evening.
A helpline for Leaving Cert students has now been opened on 01-889-2199 in response to the latest development.