Quite bluntly, nested cursors are (usually) a terrible idea. You can get what you want directly, without using a cursor, by using a normal CROSS JOIN.
INSERT INTO proj_attr (project, attribute)
SELECT p.id AS projectid, a.id AS attributeid
FROM project p CROSS JOIN attribute a;