An 11-year-old boy swimming in the waters of Australia's Great Barrier Reef was mauled by a shark on Tuesday, officials said, the second attack in the area in four days.

The boy was swimming off Heron Island, some 460 kilometres north of Queensland state's capital Brisbane, when he was attacked, a Queensland Ambulance spokesman told AFP.

"(He had) significant injuries to his left lower calf," the spokesman said, adding that the wounds were not life-threatening and the boy was en route to hospital in a stable condition.

The attack comes after a 31-year-old man was bitten by a shark - reportedly a three-metre animal - on Saturday while spearfishing off Miall Island, also near the southern end of the reef.

Ambulance officials told the Australian Broadcasting Corp that the man sustained the wounds while repeatedly punching the shark until it left.

A spate of attacks in neighbouring New South Wales state last year led authorities to implement a range of shark-prevention measures to reduce encounters during the busy 2015-16 summer season.

Measures include the testing of aerial drones to track sharks' movements, although the state government has ruled out culling the animals.

There were 14 attacks in New South Wales last year - including the death of a Japanese surfer - compared to three in 2014, according to data compiled by Sydney's Taronga Zoo.

In Queensland, there were four non-fatal attacks in 2015, compared to one in 2014.

Experts say attacks are increasing as water sports become more popular and bait fish move closer to shore, but fatalities remain rare.