diff --git a/Base/res/html/misc/checkbox.html b/Base/res/html/misc/checkbox.html
new file mode 100644
index 0000000000..86b8198b0c
--- /dev/null
+++ b/Base/res/html/misc/checkbox.html
@@ -0,0 +1,11 @@
+
+ This is a checkbox
+
diff --git a/Libraries/LibWeb/Layout/LayoutCheckBox.cpp b/Libraries/LibWeb/Layout/LayoutCheckBox.cpp
index febab14800..f1d76c3352 100644
--- a/Libraries/LibWeb/Layout/LayoutCheckBox.cpp
+++ b/Libraries/LibWeb/Layout/LayoutCheckBox.cpp
@@ -80,6 +80,9 @@ void LayoutCheckBox::handle_mouseup(Badge, const Gfx::IntPoint& po
if (!m_tracking_mouse || button != GUI::MouseButton::Left)
return;
+ // NOTE: Changing the checked state of the DOM node may run arbitrary JS, which could disappear this node.
+ NonnullRefPtr protect = *this;
+
bool is_inside = enclosing_int_rect(absolute_rect()).contains(position);
if (is_inside)
node().set_checked(!node().checked());