Sony Pictures has agreed pay about $8m to settle the class action lawsuit filed by employees following a hack attack in 2014.

The class action lawsuit was brought by employees of Sony, alleging that the company failed to ensure their security.

In a document submitted to the federal court in Los Angeles, the company has agreed to give approximately $2.5m to employees whose identity information was hacked.

The company will also pay $3,490,000 to bear the legal expenses and costs, but will not exceed $34,000 in the aggregate.

The settlement follows the Court’s partial denial of Sony Pictures’ motion to dismiss, briefing on class certification, and significant discovery, and was achieved five months before the scheduled trial date.

In December 2014 and January 2015, ten former employees filed seven cases in the court.

The hacking incident, believed to have been a handiwork of hackers related to the North Korean government, released confidential data of Sony Pictures Entertainment on November 24, 2014.

The hackers identified themselves as Guardians of Peace" said to have carried out hacking exploit demanding to stop release of the movie, The Interview.

The Interview movie is loosely based on a plot to assassinate North Korean leader Kim Jong-un. North Korea however denied such allegations.