Skip to content

Commit f2b703d

Browse files
authored
πŸ› FIX: CVE-2026-0969 β€” Upgrade next-mdx-remote to v6.0.0 (#169)
Upgrade next-mdx-remote from v5 to v6 to fix arbitrary code execution vulnerability (CVE-2026-0969) in the serialize function. The v6 release adds blockDangerousJS (enabled by default) to prevent dangerous JS operations like eval, Function, process, and require. Set blockJS: false in serialize options to preserve MDX annotation expressions used in docs content.
1 parent 23e501a commit f2b703d

File tree

4 files changed

+29
-15
lines changed

4 files changed

+29
-15
lines changed

β€Žapps/baseai.dev/package.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"mdx-annotations": "^0.1.1",
4848
"mxcn": "^2.0.0",
4949
"next": "15.5.10",
50-
"next-mdx-remote": "^5.0.0",
50+
"next-mdx-remote": "^6.0.0",
5151
"next-themes": "^0.2.1",
5252
"react": "^19",
5353
"react-dom": "^19",

β€Žapps/baseai.dev/src/lib/get-content-by-slug-on-dev.tsβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ export async function getContentBySlugOnDev({
4646
recmaPlugins: [...recmaPlugins],
4747
rehypePlugins: [...rehypePlugins],
4848
remarkPlugins: [...remarkPlugins]
49-
}
49+
},
50+
blockJS: false
5051
});
5152

5253
const docsSection = await formatString(section);

β€Žapps/baseai.dev/src/scripts/generate-content.jsβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ async function fetchMDXContent({ slug, section, dirPath, baseUrl }) {
3636
recmaPlugins: [...recmaPlugins],
3737
rehypePlugins: [...rehypePlugins],
3838
remarkPlugins: [...remarkPlugins]
39-
}
39+
},
40+
blockJS: false
4041
});
4142

4243
const docsSection = await formatString(section);

β€Žpnpm-lock.yamlβ€Ž

Lines changed: 24 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)