Try this Javascript (on a copy!). First make sure your measurement units are in points! Or else it will try to work in centimeters or inches, or what-have-you-got, and it may even do something — but not what you wanted it to.
It first gathers all 'pageItems' that are 'inside stories', which is what an anchored object actually is. Then it calls a small helper function that determines if the height (as given by geometricBounds) is in the neighborhood of your 25.337 pts. It needs a bit of a fuzzy comparison, because InDesign doesn't really show all fourteen decimals it internally uses — your anchored object may in fact be 25.336999999 pts high, and comparing it against exactly 25.337 would return “false”!
Then, if a match is found, it uses the 'add to' subfunction of the 'resize' method to add 4.903 pts.
allAnchObjects = app.activeDocument.stories.everyItem().pageItems.everyItem().getElements();
for (i=0; i<allAnchObjects.length; i++)
{
if (isRightHeight (allAnchObjects[i]))
{
allAnchObjects[i].resize (
BoundingBoxLimits.GEOMETRIC_PATH_BOUNDS,
AnchorPoint.TOP_LEFT_ANCHOR,
ResizeMethods.ADDING_CURRENT_DIMENSIONS_TO,
[ 0, 4.903 ]);
}
}
function isRightHeight (object)
{
var h = object.geometricBounds[2]-object.geometricBounds[0];
if (h > 25.336 && h < 25.338)
return true;
return false;
}